The goal is to write a CSV file to a SQL Server database table requiring a foreign key (FK). This FK is not in the CSV. In my workspace, I create this FK (BatchID) in a table using a SQLCreator, but for the life of me can't figure out how to get that (as a new attribute) into each row of the CSV. I've tried parameters and various transformers but nothing presents the CSV + populated BatchID field. All I get are the 25 records from the CSV and one record from the SQLCreator.
The SQLCreator that creates the BatchID uses the following SQL Code.
declare @tbl table (id int)
insert Import_Batch (SystemName) output inserted.Import_BatchID into @tbl(id) values ('testReaderBoard')
select * from @tbl
An inspector (and database query) shows the record is created.
Maybe I need to create the BatchID in a separate workspace, because it doesn't really `exist` when the CSV reader is processed?