Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I would like some advice on a challenge I have with a flow.
Using snowflake as my target database, my objective is to have the file load status table updated following the completion of a COPY transfer from 1:many files.
A row will be passed to the status table for each file loaded.
DDL for the table is ;
"ID" INT AUTOINCREMENT(1,1) NOT NULL,
"STATUS" STRING NOT NULL,
"FILE_NAME" STRING NOT NULL,
"STAGE_LOCATION" STRING NOT NULL,
"LAST_LOAD_TIME" DATETIME NOT NULL,
"ROW_COUNT" INT NOT NULL,
"ROW_PARSED" INT NOT NULL,
"ERROR_COUNT" INT NOT NULL,
"FIRST_ERROR_MESSAGE" STRING,
"PROJECT" STRING NOT NULL,
"JOB_NAME" STRING NOT NULL
Currently the flow runs as follows:
tDBInput -> tJavaRow -> tFixedFlowInput -> tDBOutput
I've attached images of the flow and components.
From the flow image, you will see that only 1 record is passed from the tJavaRow through the FixedFlow and onto the DB.
So, I'm after some advice on how to get both records flowing through.
Thanks
Dave
Hello,
Have you considered using a tMap inbetween the input and the output?
If you want to decouple then I'd suggest to look at tFlowToIterate and utilize globalMap instead of context.
Cheers,
Balázs
Resolved with the following component flow...
tDBInput >tFlowToIterate > tJava > tFixedFlowInput > tDBOutput
Global variables are being set in the tFlowToIterate and then utilising the initialise global variables in the tFixedFlowInput when setting the value to be written to the tDBOutput component