Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
gurn
Contributor III
Contributor III

Flow of multiple records created from tjavarow into a database

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

Labels (5)
2 Replies
Anonymous
Not applicable

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

gurn
Contributor III
Contributor III
Author

Resolved with the following component flow...

 

tDBInput >tFlowToIterate > tJava > tFixedFlowInput > tDBOutput

 

0695b00000Z2XPmAAN.png 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