TDM Parameters - Regular Mode - Implementation Guidelines

Prerequisite: Verify that the LU_PARAMS table is attached to the LU Schema.

Optional - Adding Parameters for Logical Unit

  1. Add the LU's parameters to the LuParams MTable (located under References in the Project tree).

    Note that from TDM 8.1 onwards, the previous translation object - trnLuParams - is replaced with the LuParams MTable. Deploy all LUs to the debug server and run the RunTDMDBUpgradeScripts flow. This flow runs the convertLuTranslations flow to convert old TDM translations to the equivalent TDM MTables. Each execution of the convertLuTranslations flow deletes and re-populates the related MTables.

  2. The LuParams has the following fields:

    • lu_name
    • column_name - populated with the parameter name. The parameter name can be different from the LU table's field name.
    • sql
  3. LuParams example:

lu_name column_name sql
CRM first_name Select first_name
 From customer
CRM last_name Select last_name
 From customer
CRM line_number Select contract.associated_line As line_number From contract
CRM num_of_open_cases Select Count(*) As num_of_open_cases
From cases
Where Upper(cases.status) != 'CLOSED'
CRM open_case_date Select case_date As open_case_date
From cases
Where Upper(cases.status) != 'CLOSED'
CRM num_of_subscribers Select Count(*) As num_of_subscribers From contract
CRM state Select state From address
Billing total_balance_amount Select Sum(ifNull(Billing.balance.available_amount, 0)) As total_balance_amount
From Billing.balance
Billing num_of_open_invoices Select Count(*) As num_of_open_invoices
From Billing.invoice
Where Upper(Billing.invoice.status) = 'OPEN'
Billing total_payment_amount Select Sum(ifNull(Billing.payment.amount, 0)) As total_payment_amount
From Billing.payment
Billing vip_status Select Distinct vip_status
From Billing.subscriber
Billing subscriber_type Select Distinct subscriber_type From Billing.subscriber
Asset transaction_duartion Select Distinct duration From Asset.asset_transaction
Asset transaction_city Select Distinct transactioncity From Asset.asset_transaction
  1. The LU_PARAMS' population flow runs the fnEnrichmentLuParams function. This function runs the LU's SQL queries in the LuParams, creates the <LU>_params table in the TDM DB if needed, and populates the <LU>_params table in the TDM DB. Each parameter's column holds a JSON file that contains the values of the parameter. Each parameter can hold several values that are separated by a comma. For example:

    • Line number = {"(722) 404-4222","+1 (372) 682-2450,"+1 (799) 979-1233","883-486-7523","1394031132"}

TDM Parameter Tables

When synced, the LUIs create and update the <LU>_params table in the TDM database. A separate <LU>_params table is created for each LU. The naming convention of the parameter table is <LU Name>_params, e.g., customer_params.

In addition, the TDM task execution process populates the tdm_params_distinct_values TDM DB table with the parameters list and the valid values for [combo parameters].

Parameter tables are used for the following:

  • Getting the list of available parameters per task.
  • Getting the number of matching entities for the selected parameters of the task.
  • Creating the entity list for the task if the task's selection method is based on parameters.
  • Creating the entity list for the task if a random selection of entities is used whereby the entities are randomly selected from the <LU>_params table of the task's root LU.

AI-based Generation

The AI-based generated entities are not 'synced' from a data source. The AI process generates entities, and TDM imports the generated entities to Fabric. A post TDM process updates the parameter tables for the imported entities to enable a selection of these entities based on parameters.

Click here for more information about the AI-based generation.

Notes:

  • The LU_PARAMS' population runs the SQL queries to retrieve the LU tables' data. Therefore, it has an execution order 999 to run after the remaining LU tables' population.
  • Do not include spaces or special characters in parameter names.
  • Even if parameters do not need to be defined for an LU, the LU_PARAMS table must be added to the LU Schema to create the <LU Name>_params table in the TDM DB. The <LU Name>_params table is needed by both entities selection methods of a TDM task: Parameters and Random Selection.
  • The PARAMS_JSON field of the LU_PARAMS table contains the list of LU parameters and their values to enable the debugging of a given entity.
  • Click here for more information about parameters handling.

TDM Parameters - Regular Mode - Implementation Guidelines

Prerequisite: Verify that the LU_PARAMS table is attached to the LU Schema.

Optional - Adding Parameters for Logical Unit

  1. Add the LU's parameters to the LuParams MTable (located under References in the Project tree).

    Note that from TDM 8.1 onwards, the previous translation object - trnLuParams - is replaced with the LuParams MTable. Deploy all LUs to the debug server and run the RunTDMDBUpgradeScripts flow. This flow runs the convertLuTranslations flow to convert old TDM translations to the equivalent TDM MTables. Each execution of the convertLuTranslations flow deletes and re-populates the related MTables.

  2. The LuParams has the following fields:

    • lu_name
    • column_name - populated with the parameter name. The parameter name can be different from the LU table's field name.
    • sql
  3. LuParams example:

lu_name column_name sql
CRM first_name Select first_name
 From customer
CRM last_name Select last_name
 From customer
CRM line_number Select contract.associated_line As line_number From contract
CRM num_of_open_cases Select Count(*) As num_of_open_cases
From cases
Where Upper(cases.status) != 'CLOSED'
CRM open_case_date Select case_date As open_case_date
From cases
Where Upper(cases.status) != 'CLOSED'
CRM num_of_subscribers Select Count(*) As num_of_subscribers From contract
CRM state Select state From address
Billing total_balance_amount Select Sum(ifNull(Billing.balance.available_amount, 0)) As total_balance_amount
From Billing.balance
Billing num_of_open_invoices Select Count(*) As num_of_open_invoices
From Billing.invoice
Where Upper(Billing.invoice.status) = 'OPEN'
Billing total_payment_amount Select Sum(ifNull(Billing.payment.amount, 0)) As total_payment_amount
From Billing.payment
Billing vip_status Select Distinct vip_status
From Billing.subscriber
Billing subscriber_type Select Distinct subscriber_type From Billing.subscriber
Asset transaction_duartion Select Distinct duration From Asset.asset_transaction
Asset transaction_city Select Distinct transactioncity From Asset.asset_transaction
  1. The LU_PARAMS' population flow runs the fnEnrichmentLuParams function. This function runs the LU's SQL queries in the LuParams, creates the <LU>_params table in the TDM DB if needed, and populates the <LU>_params table in the TDM DB. Each parameter's column holds a JSON file that contains the values of the parameter. Each parameter can hold several values that are separated by a comma. For example:

    • Line number = {"(722) 404-4222","+1 (372) 682-2450,"+1 (799) 979-1233","883-486-7523","1394031132"}

TDM Parameter Tables

When synced, the LUIs create and update the <LU>_params table in the TDM database. A separate <LU>_params table is created for each LU. The naming convention of the parameter table is <LU Name>_params, e.g., customer_params.

In addition, the TDM task execution process populates the tdm_params_distinct_values TDM DB table with the parameters list and the valid values for [combo parameters].

Parameter tables are used for the following:

  • Getting the list of available parameters per task.
  • Getting the number of matching entities for the selected parameters of the task.
  • Creating the entity list for the task if the task's selection method is based on parameters.
  • Creating the entity list for the task if a random selection of entities is used whereby the entities are randomly selected from the <LU>_params table of the task's root LU.

AI-based Generation

The AI-based generated entities are not 'synced' from a data source. The AI process generates entities, and TDM imports the generated entities to Fabric. A post TDM process updates the parameter tables for the imported entities to enable a selection of these entities based on parameters.

Click here for more information about the AI-based generation.

Notes:

  • The LU_PARAMS' population runs the SQL queries to retrieve the LU tables' data. Therefore, it has an execution order 999 to run after the remaining LU tables' population.
  • Do not include spaces or special characters in parameter names.
  • Even if parameters do not need to be defined for an LU, the LU_PARAMS table must be added to the LU Schema to create the <LU Name>_params table in the TDM DB. The <LU Name>_params table is needed by both entities selection methods of a TDM task: Parameters and Random Selection.
  • The PARAMS_JSON field of the LU_PARAMS table contains the list of LU parameters and their values to enable the debugging of a given entity.
  • Click here for more information about parameters handling.