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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Dynamic table name for tPostgresSQL

Hello all,
I would like to migrate all my ETL jobs from pentaho to talend. The job schema is described below.
tMongoDBInput-->row1(Main)-->tSetGlobalVar-->row2(Main)--> tPostgresSQL
In the tSetGlobaVar component I used as key "tbn" and value row1.id. The Postgres output table name have the following value:  (String)globalMap.get("tbn").
When I run the migration the table name is always null and I am not able to pass the current value from the global variable.
Below my transformation schema.

Could someone give me a hand of this?
Thank you in advance.
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This approach cannot work because the tPostgresqlOutput components setup there SQL statements just before the flow starts - also before you get your table name from tSetGlobalVar.
You could use tPostgresqlRow component, this component creates the statements within the flow.

View solution in original post

3 Replies
Anonymous
Not applicable
Author

This approach cannot work because the tPostgresqlOutput components setup there SQL statements just before the flow starts - also before you get your table name from tSetGlobalVar.
You could use tPostgresqlRow component, this component creates the statements within the flow.
vapukov
Master II
Master II

Other possible way - make 2 steps Job
[list=1]
  • prepare list of tables

  • iterate thru list of tables

  • Anonymous
    Not applicable
    Author

    Hello all,
    I've used the solution proposed by jlolling. It works perfect. Regards the other solution I could not prepare the ids because are dynamic in each document comping from mongo.

    Thank you very much,
    Jaume