Mosaic-Decisions: different types of parameters - mosaic-decisions

What different types of parameters do mosaic decision provide?What is the difference between input, calculated, sql and global variables?

Mosaic has two types of parameters:
1. System Parameters - These parameters are auto-generated by the mosaic and are passed to hooks and schedule for further use. User cannot edit the values of these parameters. Following are the available system parameters:
a. lastSuccessfulRunDate
b. lastRunDate
c. instanceId
d. current Time
e. object Name
f. Username
g. User-defined Parameters
2. User Parameter - These parameters are defined by an user during the configuration of a flow and can be used in flows as per defined or calculated values. User-defined parameters include:
a. Input
b. Calculated
c. SQL
d. Global
Difference between Input, Calculated, SQL and Global -
1. Input Parameter - The Input parameter are the parameters that can be used in any flow nodes, hooks, scheduler and can be edited and deleted as and when required.
2. Calculated Parameter - The calculated parameters are the parameters whose values are calculated based on the expression user define.
3. SQL Parameter - These parameters are used when there is a need to fetch values from records using SQL queries. Mosaic supports Databases like Oracle, SQL, Snowflake, Postgres and SQL Server
4. Global Parameter - These parameters are just as input parameters but these parameters unlike input parameters can be used across the platform. These parameters are defined at Manager Persona and can be added into the flow just like other parameters.
Note - Global Parameters cannot be edited through flows. User will have to edit it through Mosaic Manager and the updated value will get reflected in all the flows the parameter is used.
For more details please refer below link to Mosaic User Help Document -
https://mosaic.ga.lti-mosaic.com/usermanual/parameter.html
Hope this is helpful :)

Related

Can I get pipeline parameters in Synapse Studio Notebook dynamically without predefining parameter names in parameter cell?

In the Pipeline that triggers the Notebook, I'm passing some base parameters in, as below.
Right now, all the materials I read instructed me to declare variables inside the Notebook parameter cell with the same names, as below.
Is there a way that I can get the Pipeline parameters dynamically without pre-defining the variables? (Similar mechanism with sys.argv, in which a list of args are returned without the need of predefined variables)
To be able to pass parameters, you should have them declared in the synapse notebooks so that the values can be received and used as per requirement.
The closest functionality similar to sys.argv you can get is to just declare one parameter in the parameter cell.
Now, concatenate all the values separated by a delimiter like space or ,. So that, you can just use split and use the values same as sys.argv. So, instead of creating new parameters each time, you can just concatenate the value to this parameter itself.
#{pipeline().parameters.a} #{pipeline().parameters.b} #{pipeline().parameters.c}
When I run this, the values would be passed as shown below. You can use split on args variable and then use the values accordingly.

ODI Declare variable

I have ODI ( Oracle Data Integrator)scenario in which I need to give some input parameters when the ODI scenario is executed. For this I have created the declared variable and used the same in one of the interface but when I ran the scenario input parameters are prompted as desired given the necessary value, the scenario is successful but I see no value under variable and interface loaded with zero records. Please share your thoughts.
Declared variable text data type as I am passing string value.

How to execute a BADI in BAPI_ACC_DOCUMENT_POST from C#?

I have to pass data to BAdI acc_document in parameter extension1 of BAPI bapi_acc_document_post, but i don't know how to do that using SAP .Net connector.
Any suggestions?
Regards, Devinder
BAPI extension parameters are pretty much free-form - as you can see, for BAPI_ACC_DOCUMENT_POST parameters EXTENSION1 and EXTENSION2 are defined as tables with character fields.
You can store whatever data you want to into them and use them as you do any other BAPI parameters, the key is that you need to interpret the values in your enhancement. For example, if the caller stores an external document number into a row of EXTENSION1, just interpret it as a document number when you use it in your BADI. If you're passing a structure in the extension parameter it can be a little trickier (as you have multiple fields to deal with), but the same principle applies.

Why should "ordinary string formatting" be used for table/field names in psycopg queries?

From the documentation on properly passing SQL parameters to psycopg2:
"Only variable values should be bound via this method: it shouldn’t be used to set table or field names. For these elements, ordinary string formatting should be used before running execute()."
http://initd.org/psycopg/docs/usage.html#passing-parameters-to-sql-queries
Why is this? Why would setting a field name not have the same SQL injection problems as setting values?
Because you don't usually receive names of your tables or fields from users, you specify them in your code yourself. If you generate your request based on values got from user input, than yes, you should do some kind of escaping to avoid SQL injections.

Pentaho Data Integration - Pass dynamic value for 'Add sequence' as Start

Can we pass any dynamic value (which is the max value of another table column) in "Start at Value" in ADD Sequence step.
Please guide me.
Yes, but as the step is written you'll have to be sneaky about it.
Create two transforms and wrap them up in a job. In the first transform, query that database to get the value you want, then store it in a variable. Then in the second transform, which you should execute in the job after the first, in the Add Sequence step use variable substitution on the Start at Value field to sub in the value you previously extracted from the earlier transform.
Note that you can't do this all in one transform because there is no way to ensure that the variable will be set before the Add Sequence step (although it might seem like Wait steps would make this possible, I've tried it in the past and was unsuccessful and so had to go with the methods described above).