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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Can I get the table name from tOracleInput1

Is there a reference to get the table name being accessed by tOracleOutput_1?
I know there are references to get the input count calling tOracleOutput_1_NB_LINE_INSERTED. Is there something like tOracleOutput_1_TABLE_NAME?

The goal is to be able to pass the component name into a logging method and have it log the events against any table.
log("tOracleOutput");
....
public void log(String component) {
recordTableName = globalMap.get(component + "_TABLE_NAME");
recordInsertCount = globalMap.get(component + "_NB_LINE_INSERTED");
recordUpdatedCount = globalMap.get(component + "_NB_LINE_UPDATED");
}
Labels (2)
2 Replies
Anonymous
Not applicable
Author

Inside the globalMap there is no such information available.
But you can use a workaround. Giving you know the table output component name (it will be the parameter of your log function):
1. Add a tJavaFlex after your output connecting both with the main flow:
tOracleOutput ---> tJavaFlex
2. In the end part of the tJavaFlex, you can have access to a variable that will contains the table name. Send the value of that variable as a parameter to your log function:
log("tOracleOutput_1", tableName_tOracleOutput_1);

3. Then you can write your function as:
public void log(String component, String table) {
recordTableName = table;
recordInsertCount = globalMap.get(component + "_NB_LINE_INSERTED");
recordUpdatedCount = globalMap.get(component + "_NB_LINE_UPDATED");
}
Anonymous
Not applicable
Author

Thanks for the suggestion. I'll give that try.