Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.
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
But why not with my tHashInput data? Here is the data I am transmitting (there are about 4000 lines like this)
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.