Creating scripts

This topic describes the creation of scripts in relational modeling. Scripts can also be run from API Gateway or ION API, in an ION data flow, for example.

Custom settings can be used to parameterize load queries, scripts, and cube mappings.

Scripts can be SQL or non-SQL.

  1. Select Dashboards > Data Integrations > Relational Modeling.
  2. Select the database in the Target Connection list.
  3. Click Scripts.
  4. Select the application.
  5. Click Add.
  6. Specify a name for the script or accept the default.
  7. Optionally, specify a description of the script.
  8. Specify your script in the Script Editor and click Validate.
    The Object Browser displays the target connection, its tables and views and their columns and their metadata. Double-click columns to add them to scripts. For reference only, the structure of the Integration table is displayed.
    Note: Scripts can be parametrized with the use of custom settings. Relational modeling automatically translates custom settings to SQL parameters. This eliminates the risk of SQL-injection.
    Use this syntax to incorporate a custom setting into a script:
    @CustomSettings.<setting_name>

    For example:

    delete * from Table where ModifiedDate > @CustomSettings.LoadFromDate