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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to get an instence of a component in tjava

I want ask if there is way to get an instance of a component if a job(ex:tmap , tmysqlinput) in tjava code and then manipulate it manually using code 

Help please

Labels (1)
5 Replies
TRF
Champion II
Champion II

Very hazardous. Looking at the generated Java code will give you some answers (I think so).
In fact, accessing to some objects properties is possible (there is blogs and articles about this) but changing anything seems to be dangerous (IMHO).
Anonymous
Not applicable
Author

hi TRF 

thank you again for your answer

would you mind giving me some example or links on how can i access to object properties

actually i want to find a way on how can i add with javacode some column to a csv file structure

thank you

TRF
Champion II
Champion II

Well, I don't want give you bad information regarding this little bit tricky subject.

May be a guy as @rhall can give you good directions or advices.

Also Bekwam's blog may help you.

 

Regards,

 

Anonymous
Not applicable
Author

You don't have total control over other components at runtime, but you can take some control. An example of this is switching Connections (DB and FTP, for example) at runtime. This tutorial shows how this is achieved by using Java (https://www.rilhia.com/quicktips/quick-tip-dynamically-change-db-connection). As @TRF suggests, it is not necessarily the safest thing to be trying. But sometimes it can actually be quite useful. However this is not really documented anywhere and would probably be considered "hacking". Remember to look at the code that is generated. If you can read Java, you will learn a lot. 

Anonymous
Not applicable
Author

rhall2_0

thank you very much for your explanation