Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
stephbzr
Contributor III
Contributor III

I can't transmit data in tDBSP

Hello,

I can't find a solution to transmit data in tDBSP. I have difficulties with this component, only when I transmit data from a tDBInput I can get an output. But when I try to pass data from Talend (not a query) then it doesn't work.

My job goes like this:

- I get data from a file that I process in a tJavaFlex and store in tHashOutput to create an output/input that can be used anytime. 

- I use this input in my tMap to transform my data 

- BUT I also want to use this input for the input parameters of a tDBSP. 

0695b00000aG783AAC.png

0695b00000aG7AJAA0.png

0695b00000aG7BbAAK.png

When I run the job, it stays running for a long time... then I get this error. I tried the same scenario, but replacing the tHashInput with a tDBInput with a SQL query and it works. But obviously this is not what I am looking for.

0695b00000aG7EVAA0.png

Labels (3)
3 Replies
RJLC
Contributor
Contributor

You can initialize the hash with a tFixedInput, with default values for each field, from tPrejob.

 

Remember that the hash is not created if no record reaches the tHashOutput. On the contrary, the SQL table, although it may be empty, is always created in the database. That's why a method that uses a database component works for you and the hash does not.

stephbzr
Contributor III
Contributor III
Author

Hello @Roberto Lerma​ ,

 

I can't set default values because what I'm looking for is that the column I'm passing to tDBSP is an output column from the file (tHashOutput). 

For the moment as you say, it is only with tDBInput that I can pass data to tDBSP. But with my Talend data as output from a file, I don't understand why it doesn't work. 

 

With tFixed, it works

 

0695b00000aG8h9AAC.png0695b00000aG8jFAAS.png 

But why not with my tHashInput data? Here is the data I am transmitting (there are about 4000 lines like this)

 

0695b00000aG8lGAAS.png

RJLC
Contributor
Contributor

The error indicates that, at the time of loading the hash with tHashInput, the hash has not yet been created.

 

I understand that the execution order of the parts of the Job is correct. First create the hash with thashoutput and then execute the part where the hash is used with tHashInput.

 

The tFixedInput in tPrejob is to force the hash to be created, although with a fictitious record, before starting any other step of the job. This will prevent it from giving an error and you will be able to evaluate if any records are loaded in the hash if you run it from Talend Studio.