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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
josaalsu
Contributor
Contributor

Can not retrieve querys tDBInput object

I have defined the following flow

0695b00000EaHziAAF.png

tDBInput_1 retrieving owner & tables to perform a extraction from INFORMIX to Data Lake

All querys was correctly extracted from tFileOutputDelimited_2

All querys was correctly readed from tFileInputRow_1

as it can be seen in the following screenshot:

0695b00000EaI0bAAF.png

but, if I link the object tFileInputFullRow_1 with the object tDbInput_2, it tells me that it cannot execute the query, because the SQL statement is null.

0695b00000EaI28AAF.png

in QUERY, I have put:

((String) globalMap.get ("tFileInputFullRow_1.csql"))

((String) globalMap.get ("tFileInputFullRow_1_csql"))

((String) globalMap.get ("csql"))

But it always returns the same error.

0695b00000EaI2hAAF.png

Can someone tell me what I'm doing wrong?

Thanks in advance. Best regards.

Labels (3)
8 Replies
Anonymous
Not applicable

Hello,

You need to set the value to context variable first before you execute the SQL statement, otherwise, the context value will always be null.

Best regards

Sabrina

josaalsu
Contributor
Contributor
Author

Thanks Sabrina.

A question. Is it not possible to directly collect the value from the iteration of the tFileInputRow and assign it to the Query of the tDbInput, without having to go through the context?

Thanks in advance.

gjeremy1617088143

Hi,

TFileInputFullRow_1 -->main--> tFlowtoIterate --> iterate --> empty tJava --> on component ok --> tDbinput

In the Outline view you can see all the globalVar created by the tFlowtoIterate. And you can paste them in the query of your tDbinput.

 

and so instead of a TFileInputFullRow you can now use TFileInputDelimited.

Send me LOve and Kudos

josaalsu
Contributor
Contributor
Author

@guenneguez jeremy​ many thanks.

With what you have proposed to me, it no longer fails, which was the objective to be able to see the operation and the interaction with the different databases.

0695b00000EaV4lAAF.jpg 

We would like to be able to get the following model to work, which would not be necessary to go through temporary files to retrieve the SQL statements, but it is so that it is understood that we would like to test.

0695b00000EaV4vAAF.jpgIn this case, from tDBDP_1, it returns different querys statements that retrieve data from different tables, and that the results of each of the SQL statements retrieved and executed in tDBINPUT_1, for each one of them, a JSON file must be generated.

 

Do you think this is the best model to make, to obtain the commented results?

Thanks in advance. I send you love & kudos

gjeremy1617088143

don't use file :

tDSBP_1 --> main--> tFlowtoiterate --> iterate --> empty tJava --> on component Ok --> tDbinput_2 with the globalVar (set with the tFlowtoIterate in the query (like (String)globalMap.get("row2.csql")).

josaalsu
Contributor
Contributor
Author

Many Thanks.

I have used the File to verify that it was actually recovering data.

The point is that when executing tDBInput_2, as the map varies in each SQL statement, it does not return data and the object tDBInput_2 returns blanks and not the values of the executions.

Is there a way to be able to make different queries and that in each one to be able to write a JSON?

Thanks in advance.

gjeremy1617088143

If you have a talend studio (not open studio), you can use Dynamics schema, and extract data in common of all your table ,then write it to a json.

if each table have differents values it will be very hard to manage.

josaalsu
Contributor
Contributor
Author

Hi. @guenneguez jeremy​ Thanks for your feedback

We are testing different tools to see which one really solves our needs.

We only have Talend open studio. I understand that the other is a paid version, I do not know if it has a trial that is operational even if it is only for 1 day to be able to check what we need to do, since the rest of the things that we require we have seen that it does.

Another thing we would like to know is whether it is possible to assign the map by, for example, reading a file.

Thanks in advance. BR.