[tFileCopy] Log details on files copied

Seven Stars

[tFileCopy] Log details on files copied

Hello folks,

 

I have 2 environments, namely qualification and recette

Contexts are configured for each one of them

 

The last part of my job simply copy files from one folder to another on the same machine.

Capture1.JPG

Capture2.JPG

Capture3.JPG

 

When i run on qualification, all the files are copied successfully but on recette nothing has been copied.

context.archiveSentDir + context.currentDateTime + "/" has already been tested; i have retrieved the file path and it looks good.

 

Capture6.JPG

 

Capture4.JPG

 

 

Is there a way i can check what is wrong?

Or how to use the global variable of tFileCopy component?

 

Capture7.JPG

 

Thank you for your help.

 

Best regards,

asadasing

Nine Stars

Re: [tFileCopy] Log details on files copied

Hi,

The global variables can be used exactly the same way you used the ((String)globalMap.get("tFileList_2_CURRENT_FILEPATH")) in your tFileCopy component.

For exemple, you can use them in a tJava to display the values (use the autocompletion to have the correct name) :
System.out.println("destination directory: "+((String)globalMap.get("tFileCopy_1_DESTINATION_DIRECTORY")));

In order to debug your issue, you add a tJava somwhere (for exemple, you can replace the tFileCopy with a tJava) and use it to print some debug information such as:
System.out.println("current file: "+((String)globalMap.get("tFileList_2_CURRENT_FILEPATH")));

This code should display the current file of the tFileList loop when you run your job.

If you cannot see the previous log, try displaying others tFileList variables in order to ensure they are correct:
System.out.println(context.archiveSentDir + context.currentDateTime);

If you see the log, the problem must be on the tFileCopy component.

You can also check that the job iterates on your tFileList (it should show the number of iteration when started from the studio).

Regards.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now