Create an LU Table

LU tables are the basic building blocks for creating Logical Units. There are several ways to create a new LU table.

There are three main methods for creating a new LU table:

  1. Based on Data Source table
  2. Manually
  3. Duplicate an existing table

Duplicate an existing table

From the project tree:

  • Copying an existing LU table from one LU to another. In this option if there is a Table Population it is also copied.
  • Using the Save As option. Note that this option does not copy the Table Population.

Create a New LU Table Based on Data Source

From the LU schema:

  • Right click the work area and select either the New Table From SQL Based DB Query , the New Table From SQL Based Root Function or the New Table From SQL Based Broadway Flow option.

  • Create a table based on data source table, using the DB Interface Explorer:

    • Switch from the Project tree to the DB Interface Explorer by clicking the icon on the left Activity Bar.

    • Click on the relevant interface data source and select the required table.

    • Right click on the table and choose "Add Tables to Schema". The table will be created in Fabric, according to the selected table definitions, along with its population and will be added to the schema.

    Note that you can expand the table at the DB Interface Explorer and select specific columns. When doing it, the created Fabric table will contain only the columns which were selected.

  • Create a table based on data source tables, using Query Builder:

    • At schema window top bar, click the icon to open the Add New Table popup window
    • Choose "Create New from source with SQL query".
    • Name the table and click on Create.
    • Query Builder popup window appears.
    • In the Query Builder window, select the required interface. Then either write the SQL query in the upper part in the Query Builder or expand the interface schema and its table list to find the relevant table and select it.
    • Once a query exists in the Query Builder, you can test it by clicking on Execute button. When done, click on Create button.

From the Project Tree:

  • Via the Auto Discovery Wizard to create or edit the LU. The tables and their populations are automatically created and added to the LU schema. If a table exists, you can select to either override the existing implementation or not.
  • Creating a new table manually. In this option the table population should be created separately. Once the population is created, add the table to the LU schema. Note that if the table is used as the Master of Data, there is no need to create a Table Population.

Click for More Information about Adding a Table to a Schema.

Create a New LU Table Manually

  1. Go to Project Tree > Logical Units > [LU Name], right click Tables > New Table to display the Columns tab in the Table Schema window.
  2. Define the Table Schema:
    • Complete the settings of each table column like the Name or Data Type.
    • Optional: Define the table Indexes.
    • Optional: Define the CDC and the table’s Search indexes.
  3. Define the Table Properties.
  4. Save the table.

How Do I Edit an LU Table?

  1. Go to Project Tree > Logical Units > [LU Name] > Tables > [Table Name] to display the Columns tab in the Table Schema window.
  2. Optional: Edit the table’s Columns, Indexes, Search Indexes or Table Properties.
  3. Save the table.

Note that in specific cases the Data Type of a column that has been automatically created based on a DB table may need to be edited manually. For example, a Number column in Oracle is created in Fabric with Data Type = Real. This column might need to be modified to an Integer or Text in the LU table.

Table Schema Definition

The LU Table Schema is defined in the Columns Tab in the Table window where you can set the columns and their types, mark mandatory fields and set the default values.

Index

Defines the position of the column in the table which can be moved up or down.

Name

Column name.

Data Type

The Data Type of the values in the column. The following types are supported:

  • Integer
  • Real
  • Text
  • Datetime, saved as java.sql.Timestamp class (supported till nano-seconds)
  • Date, saved as java.sql.Date class
  • Time, saved as java.sql.Time class
  • Blob

Note that if the Oracle field type is Number, Fabric sets the Data Type of this field to Real in the LU table and the number in Fabric has a decimal point. Therefore, if a column in the LU table does not need a decimal point (for example, for the CUSTOMER ID), change the Data Type of the LU Table column to Integer or Text.

Mandatory

When checked, this column must be populated (not null), otherwise leave it unchecked.

Default Value

The value set in this column is used to populate the table when there is no input for this column.

Comment

Additional information.

ID

Unique ID of the column generated by Fabric.

 

Previous

Create an LU Table

LU tables are the basic building blocks for creating Logical Units. There are several ways to create a new LU table.

There are three main methods for creating a new LU table:

  1. Based on Data Source table
  2. Manually
  3. Duplicate an existing table

Duplicate an existing table

From the project tree:

  • Copying an existing LU table from one LU to another. In this option if there is a Table Population it is also copied.
  • Using the Save As option. Note that this option does not copy the Table Population.

Create a New LU Table Based on Data Source

From the LU schema:

  • Right click the work area and select either the New Table From SQL Based DB Query , the New Table From SQL Based Root Function or the New Table From SQL Based Broadway Flow option.

  • Create a table based on data source table, using the DB Interface Explorer:

    • Switch from the Project tree to the DB Interface Explorer by clicking the icon on the left Activity Bar.

    • Click on the relevant interface data source and select the required table.

    • Right click on the table and choose "Add Tables to Schema". The table will be created in Fabric, according to the selected table definitions, along with its population and will be added to the schema.

    Note that you can expand the table at the DB Interface Explorer and select specific columns. When doing it, the created Fabric table will contain only the columns which were selected.

  • Create a table based on data source tables, using Query Builder:

    • At schema window top bar, click the icon to open the Add New Table popup window
    • Choose "Create New from source with SQL query".
    • Name the table and click on Create.
    • Query Builder popup window appears.
    • In the Query Builder window, select the required interface. Then either write the SQL query in the upper part in the Query Builder or expand the interface schema and its table list to find the relevant table and select it.
    • Once a query exists in the Query Builder, you can test it by clicking on Execute button. When done, click on Create button.

From the Project Tree:

  • Via the Auto Discovery Wizard to create or edit the LU. The tables and their populations are automatically created and added to the LU schema. If a table exists, you can select to either override the existing implementation or not.
  • Creating a new table manually. In this option the table population should be created separately. Once the population is created, add the table to the LU schema. Note that if the table is used as the Master of Data, there is no need to create a Table Population.

Click for More Information about Adding a Table to a Schema.

Create a New LU Table Manually

  1. Go to Project Tree > Logical Units > [LU Name], right click Tables > New Table to display the Columns tab in the Table Schema window.
  2. Define the Table Schema:
    • Complete the settings of each table column like the Name or Data Type.
    • Optional: Define the table Indexes.
    • Optional: Define the CDC and the table’s Search indexes.
  3. Define the Table Properties.
  4. Save the table.

How Do I Edit an LU Table?

  1. Go to Project Tree > Logical Units > [LU Name] > Tables > [Table Name] to display the Columns tab in the Table Schema window.
  2. Optional: Edit the table’s Columns, Indexes, Search Indexes or Table Properties.
  3. Save the table.

Note that in specific cases the Data Type of a column that has been automatically created based on a DB table may need to be edited manually. For example, a Number column in Oracle is created in Fabric with Data Type = Real. This column might need to be modified to an Integer or Text in the LU table.

Table Schema Definition

The LU Table Schema is defined in the Columns Tab in the Table window where you can set the columns and their types, mark mandatory fields and set the default values.

Index

Defines the position of the column in the table which can be moved up or down.

Name

Column name.

Data Type

The Data Type of the values in the column. The following types are supported:

  • Integer
  • Real
  • Text
  • Datetime, saved as java.sql.Timestamp class (supported till nano-seconds)
  • Date, saved as java.sql.Date class
  • Time, saved as java.sql.Time class
  • Blob

Note that if the Oracle field type is Number, Fabric sets the Data Type of this field to Real in the LU table and the number in Fabric has a decimal point. Therefore, if a column in the LU table does not need a decimal point (for example, for the CUSTOMER ID), change the Data Type of the LU Table column to Integer or Text.

Mandatory

When checked, this column must be populated (not null), otherwise leave it unchecked.

Default Value

The value set in this column is used to populate the table when there is no input for this column.

Comment

Additional information.

ID

Unique ID of the column generated by Fabric.

 

Previous