Examples of parameters in non-SQL script functions
You can create non-SQL scripts in which arguments of any non-SQL function can be set with
parameters.
Note: Parameters and their values are case-sensitive.
Example
- Create a non-SQL script called cleanUp.
- Create a parameter called application.
- Write non-SQL functions with this
syntax:
--<<NON-SQL>> ExecuteLoadQuery(@Application, "someTable", "LoadAll", TRUE); ExecuteScript(@Application,"ClearDuplicates"); ExecuteScript(@Application,"MoreCleanup"); ExecuteFactMapping(@Application,"SalesCube");
Developers can test the script against a test application, assigning the name of that application to the @application parameter.
Running a load query with parameters in a specific app
--<<NON-SQL>>
ExecuteLoadQuery(string application unique name, string table name, string load query name, bool ClearData
{parameter of called load query: <value or @parameter of this non-sql script>, parameter2 : <value or @parameter>|}
);
Running a load query with parameters in the current app
ExecuteLoadQuery(string table name, string load query name, bool ClearData
{parameter of called load query: <value or @parameter of this non-sql script>, parameter2 : <value or @parameter>|}
);
Running an integration table load with parameters in a specific app
This example runs a load query in a specific app:
--<<NON-SQL>>
ExecuteIntegrationTableLoadQuery(string application unique name, string table name, string load query name, bool ClearData
{parameter of called load query: <value or @parameter of this non-sql script>, parameter2 : <value or @parameter>|}
);
Running an integration table load with parameters in the current app
This example runs a load query in the current app.
--<<NON-SQL>>
ExecuteIntegrationTableLoadQuery("demo","Accounts","LoadAccounts", true, {Type: "A"});
Example
This example uses the query from the example, Running a load query with parameters:
--<<NON-SQL>>
ExecuteIntegrationTableLoadQuery("demo","Accounts","LoadAccounts", true, {Type: "A"});
Running a script with parameters
--<<NON-SQL>>
ExecuteScript(application unique name, script name,
{parameter : <value or @parameter>, parameter2 : <value or @parameter>|}
);
Example
--<<NON-SQL>>
ExecuteScript("demo","DeleteWaterSales",
{pWater: "Springwater", pBrand: @pBrand}
);
Running a mapping with parameters in a specific app
ExecuteFactMapping(string application unique name, string mapping name,
{parameter of called mapping: <value or @parameter of this non-sql script>, parameter2 : <value or @parameter>|}
);
Running a mapping with parameter in the current app
ExecuteFactMapping(string mapping name,
{parameter of called mapping: <value or @parameter of this non-sql script>, parameter2 : <value or @parameter>|}
);