Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Dominik_G
Contributor
Contributor

Global Variables Not Accessible tGoogleDriveList

Hi all,

 

I went all through the forum and cannot find the answer, so I ask. 

 

According to the documentation available, I should be able to access global variables for tGoogleDriveList like ID (of the file) and TITLE (of the file). 

 

However I do not see those in my Talend Studio in the outline nor can I access them using command (String)globalMap.get("tGoogleDriveList_2_TITLE").

 

What I am aiming to do is my job to pick up some files from google drive and load them to Snowflake. In order to do that I wanted to iterate on the files on Drive and using globalMap.get + global variable ID or TITLE in component tFileInputExcel select the file to be loaded to Snowflake with tdbOutput. 

 

In the meantime I tried just to print the IDs and TITLEs using tIteratetoFlow and tLogRow, but all I am getting is null values. The count of rows returned is correct, corresponds to the quantity of files in folder, but all values returned are null. 

 

Would anybody have an idea how to access those global variables? 

 

Labels (2)
12 Replies
Anonymous
Not applicable

Hi,

 

   Could you please share screen shots of your job flow and component details where you are having error? It will give us better idea about the possible root cause of the error.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Dominik_G
Contributor
Contributor
Author

Hi Nikhil,

 

See below some screenshots. 

 

I only attach the relevant part of the job. 

 

In the component tGoogleDriveGet I wanted to save all the files from a folder on which tGoogleDriveList iterates. 

 

In order to do that I would put ((String)globalMap.get("tGoogleDriveList_1_TITLE")) into the 'File' field of tGoogleDriveGet component. 

 

However it seems that the Global Variable 'TITLE' is not available, as you can see in the screen show from the 'Outline' of my TOS. And according to the documentation it should be there. 

 

I have used the above described process before, therefore I do not know why it is not working now. 

 

I appreciate your support on this. 

 

Thank you,

Dominik 

 

 

0683p000009M87X.pngPart of the job with the tGoogleDriveList component.0683p000009M87g.pngOutline in TOS showing the global variables available for the component0683p000009M7eK.pngGlobal variables which should be available for the tGoogleDrive component, according to Talend support documentation

Anonymous
Not applicable

Hi Dominik,

 

      Could you please try to get the list by using Control+Space? I could see the file name in the drop down list as shown below.

0683p000009M87l.png

 

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Dominik_G
Contributor
Contributor
Author

Hi Nikhil,

 

You are looking at the variables for component tGoogleDriveGet, which I see also. 

 

I meant the ones for component tGoogleDriveList. 

 

I did try space + ctrl, but I don't see them there either. 

 

Best,

Dominik

Anonymous
Not applicable

Hi,

 

    Could you please assign the values to a context variable or set the global variable and see whether its available after that step?

 

   For example, I could see both context variable and global variable in drop down after setting values.0683p000009M87v.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

 

 

Dominik_G
Contributor
Contributor
Author

Hello,

 

Of course I can do that and then they work.  I can access variables which I pre-set either using tJava or tSetGlobalVar, but that is not what my issue is.

The values of global variable tGoogleDriveList_TITLE or tGoogleDriveList_ID cannot be pre-set, as they are dynamically set when the job runs, basing on the name and id of the file on which the component tGoogleDriveList iterates.

I hope that clarifies..

 

Best,

Dominik

Anonymous
Not applicable

Hi 

have you solved this problem?

I have same situation...

 

Dominik_G
Contributor
Contributor
Author

Hey Stefano,

 

No I didn't. I just created a workaround, which was possible for my purpose, but the functionality I was looking for still seems unavailable. 

 

I am still hoping for an answer in this topic from somebody who knows how to solve our issue...

Anonymous
Not applicable

Tks for your reply,

I hope Tanlend Studio can find a solution.

In previous Talend version (6.1 and 6.5), it work correctly.

In latest version (now 7.2.1), this code is missing...

 

globalMap.put("tGoogleDriveList_1_ID", tGoogleDriveList_1_temp.getId());
globalMap.put("tGoogleDriveList_1_TITLE", tGoogleDriveList_1_temp.getTitle());