Use the Copy Data or Data Flow activity to read data from the API.
You will need to flatten the JSON structure, especially the nested arrays like to_GtinSalesOrg
and to_ArticleNumber
. This can be done using the 'Flatten' transformation in a Data Flow.
For fields like SalesOrg
and MainGtin
, you will need to concatenate the values from the nested arrays along with sequence numbers.
Use a 'Derived Column' transformation to create these concatenated strings. You might need to use a combination of string functions and expressions to achieve the correct format.
To assign sequence numbers to each item in the arrays, this could be done using a script transformation or a derived column with appropriate expressions.
For null values in fields like FromCut
, ensure that they are represented as 'NULL' in the concatenated string.
Map each derived field to the corresponding column in your Oracle table and ensure that the data types and formats match your Oracle table's schema.
In the sink settings of your Data Flow, specify your Oracle database and table then map the output columns of the Data Flow to the corresponding columns in the Oracle table.
Here is an example expression for concatenating SalesOrg
and MainGtin
:
concat('01||', first(SalesOrg), '||02||', second(SalesOrg), '||', '01||', first(MainGtin), '||02||', second(MainGtin))