I have a CSV file Input step using which I am populating the CSV file data into my final_result table successfully. However, there is a ID column in my final_result table which will show that this feed belongs to which batch.
The value of this ID column should come from a variable. For this what I have done is,
- At the start of each batch, an entry is made into a separate batch_info table which has an identity column that denotes the batch ID.
- This batch ID is stored into a variable using a set variable step and then accessed in the next transformation using the get variable step.
- In this next transformation, which contains a CSV input step and a table output step as well, I am manually writing this variable into database field mapping of table output step to match it with my ID column in final_result table.
However, though the variable has a value, it is not getting into the final_result table and the ID columns is showing null.
Is there any other better way to do this? Please let me know if I need to provide more information.
I am trying to explain this with images as well.
1.) Set the variable p_index which is out variable of the db stored proc:
2.) Get the value of variable set in previous step:
3.) Manually add the variable p_index in the columns list of the csv:
4. Map that variable in the table output step mappings with the table column