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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How does one reference a tColumnList from the globalMap?

Hi Talend folks!
I'm using the tColumnList and it appears to insert a tables schema as a list into the GlobalMap. Works like a charm and I've included some of the GlobalMap printed out. What I can't seem to figure out is how do you reference one of these items from a list stored in the GlobalMap?
I tried accessing them as arrays, like  tMysqlColumnList_2_COLUMN_NAME, but no go. Tried iterating, but it only outputs 1 row...so I'm a little confused.

Starting job testresponse at 02:10 19/05/2016.
connecting to socket on port 3786
connected
{tMysqlColumnList_2_NUMERIC_SCALE=0
 conn_tMysqlConnection_1=com.mysql.jdbc.JDBC4Connection@2cb4c3ab
 db_tMysqlConnection_1=ELA_Limesurvey
 tMysqlColumnList_2_CHARACTER_MAXIMUM_LENGTH=null
 tMysqlColumnList_2_NUMERIC_PRECISION=10
 tMysqlColumnList_2_DATA_TYPE=int
 tMysqlColumnList_2_COLUMN_KEY=PRI
 concurrentHashMap={}
 tMysqlConnection_1_SUBPROCESS_STATE=0
 tMysqlColumnList_2_IS_NULLABLE=NO
 tMysqlColumnList_2_COLUMN_DEFAULT=null
 tMysqlColumnList_2_COLUMN_NAME=id
 tMysqlColumnList_2_SUBPROCESS_STATE=0}
{tMysqlColumnList_2_NUMERIC_SCALE=null
 tFixedFlowInput_1_NB_LINE=1
 ColumnType=int
 conn_tMysqlConnection_1=com.mysql.jdbc.JDBC4Connection@2cb4c3ab
 db_tMysqlConnection_1=ELA_Limesurvey
 tMysqlColumnList_2_CHARACTER_MAXIMUM_LENGTH=null
 tMysqlColumnList_2_NUMERIC_PRECISION=null
 tMysqlColumnList_2_DATA_TYPE=datetime
 tMysqlColumnList_2_COLUMN_KEY=
 concurrentHashMap={}
 tMysqlConnection_1_SUBPROCESS_STATE=0
 tMysqlColumnList_2_IS_NULLABLE=YES
 ColumnName=id
 tMysqlColumnList_2_COLUMN_DEFAULT=null
 tMysqlColumnList_2_COLUMN_NAME=submitdate
 tMysqlColumnList_2_SUBPROCESS_STATE=0}
{tMysqlColumnList_2_NUMERIC_SCALE=0
 tFixedFlowInput_1_NB_LINE=1
 ColumnType=datetime
 conn_tMysqlConnection_1=com.mysql.jdbc.JDBC4Connection@2cb4c3ab
 db_tMysqlConnection_1=ELA_Limesurvey
 tMysqlColumnList_2_CHARACTER_MAXIMUM_LENGTH=null
 tMysqlColumnList_2_NUMERIC_PRECISION=10
 tMysqlColumnList_2_DATA_TYPE=int
 tMysqlColumnList_2_COLUMN_KEY=
 concurrentHashMap={}
 tMysqlConnection_1_SUBPROCESS_STATE=0
 tMysqlColumnList_2_IS_NULLABLE=YES
 ColumnName=submitdate
 tMysqlColumnList_2_COLUMN_DEFAULT=null
 tMysqlColumnList_2_COLUMN_NAME=lastpage
 tMysqlColumnList_2_SUBPROCESS_STATE=0}

Thanks!
Garf
Labels (3)
2 Replies
Anonymous
Not applicable
Author

Here's an example job that prints all the columns of the table. 
The t*ColumnList components will execute a metadata query in the BEGIN section of the component and populate the globalMap. by using the Iterate link, we allow the component to populate the globalMap with one column per iteration. 
0683p000009ME5b.png
If you need the data in a flow, you can use the tIterateToFlow component to gather up all the iterations and then output them as a flow:

0683p000009MEAG.png
Anonymous
Not applicable
Author

Thanks for the guidance John, it was the tFlowIterate that I was missing.  I'm now able to work with dynamic schemas to normalize data from a table. Still trying to figure out a few things on the output side, but I'll post my working sample back to the group  to share as soon as I get a few other pieces working.
Garf