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: 
Anonymous
Not applicable

Multiple statements in a single tAS400Row Component

Does anyone know if it is possible to execute multiple SQL statements in a tAS400Row Component similar to tMySQLRow using "allowMultiQueries=true"

 

This doesn't appear to work for tAS400 components & throws the usual end of statement error

 

.0683p000009LzkG.png

 

We are using Talend version 6.4.1

 

Thanks in advance

Labels (3)
1 Solution

Accepted Solutions
fdenis
Master
Master

it depend of the queries and the file structure.
Read queries: tFileInputRaw or Delimited (depend on file format)
Execute queries : tAS400Row tAS400Input (depend on queries)
It's possible to be compatible with all type of query (analyse query before execute)
It's possible to add comment into Script file to choose the destination of data...…
Regards

View solution in original post

7 Replies
fdenis
Master
Master

allowMultiQueries=true, depend on the JDBC Driver option.
I think that there is no similar option in AS400.
but if you rely need it, you can configure parale run on Talend Job.
Anonymous
Not applicable
Author

Thanks for the reply.

 

I don't actually need the statements to run in parallel, they execute sequentially, but the job I'm trying to automate would have 450 statements to execute in sequence. Trying to build that one row component at a time would be painful so I was hoping to be able to just paste my whole script into a single component. 

 

If that option isn't available, then I suppose I will have to do it the long way!

fdenis
Master
Master

you can read your script file and run query one by one.
Regards,
Anonymous
Not applicable
Author

At the risk of sounding completely dense - which components would you use to execute the commands from the file using tAS400 components?
fdenis
Master
Master

it depend of the queries and the file structure.
Read queries: tFileInputRaw or Delimited (depend on file format)
Execute queries : tAS400Row tAS400Input (depend on queries)
It's possible to be compatible with all type of query (analyse query before execute)
It's possible to add comment into Script file to choose the destination of data...…
Regards
Anonymous
Not applicable
Author

I have an update on this, an easier solution is to wrap the statements between BEGIN and END statements

 

eg:

BEGIN

    DROP TABLE schema.table1;

    CREATE TABLE schema.table1 .....(table stuff here);

    GRANT SELECT on schema.table1 to USER;

END

 

This greatly simplifies maintenance of code & processes automated using talend. 

kakooo16
Creator
Creator

Hello ,

 

I'm facing similar problem could we have an update on this ?