Combining Two Context variables for Tfileunarchive component to unzip a file in the same folder

Five Stars

Combining Two Context variables for Tfileunarchive component to unzip a file in the same folder

Hello Talend Community,

 

I have a tfileunarchive component that calls on two context variable "One a Directory" one as a "Value" and a tFileList_2_CURRENT_FILE. See My attachment of the component

The Directory is my local drive on my PC and the Value is a date in a 'YYYYMMDD' format. and the file that is a Zip from tFileList2 Component. Im trying to unzip that file in the same folder.

What is the proper syntax for calling two context variables and a TfileList parameter. I am getting a Java Error on this component now with the syntax.

Current Syntax on Archive File: context.copyfilepath + context.ymd_date ((String)globalMap.get("tFileList_2_CURRENT_FILE"))

Extraction Directory: context.copyfilepath + context.ymd_date

I know the folder exists in the directory that I created with my tfileCopy component.

 

Any help would be appreciated

 

 


Accepted Solutions
Highlighted
Thirteen Stars

Re: Combining Two Context variables for Tfileunarchive component to unzip a file in the same folder

1. you have missed + between context.ymd_date and global variable

2. you must add also  +"/"+ in apropriate places if your variables already do not ending with / (/ will work and for Linux and for Windows path)

-----------

All Replies
Highlighted
Thirteen Stars

Re: Combining Two Context variables for Tfileunarchive component to unzip a file in the same folder

1. you have missed + between context.ymd_date and global variable

2. you must add also  +"/"+ in apropriate places if your variables already do not ending with / (/ will work and for Linux and for Windows path)

-----------

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.