In DS only columns marked as key are populated

Question

In my Data Load I read values from Quotes and fill them into my Data Source. In the Data Source I get a correct number of rows, however only columns marked as "key" get populated.

Some more details:

  • When I assign the Key function to additional DS fields, these fields get populated too.

  • I insert the rows with:

    ​targetRows = api.getDatamartRowSet("target") targetRows?.addRow(newRow)

    where newRow has all the data.

  • I have only one element where I construct the whole row. So when I log the row content right after .addRow was called I get all the data.

  • But DatamartRowset has only key columns (and some additional system ones).

Answer

Set the Calculation Context to the "Init" value.

You probably use 'Row' elements in your logic. You can theoretically mix direct datamartRowSet with regular row element mapping, but it usually doesn't make much sense. ​When you use row elements, the job machinery iterates over the source data, and uses the row elements to map results to fields (element name == field.name). When you use datamartRowset directly, you basically call the shots, and you can set any field you like.

Found an issue in documentation? Write to us.