How to use a context Variables? I have a problem

One Star

How to use a context Variables? I have a problem

I'm trying to run the .bat with different parameters. The process creates the tables but can not read the excel to load the information, please help me.

 

C:\Users\MariaPaula\Documents\Archivos_TESIS\Jobs funcionales\Viernes27\ETL_Spot8\ETL_Spot>java -Xms256M -Xmx1024M -cp .;../lib/routines.jar;../lib/commons-collections4-4.1.jar;../lib/dom4j-1.6.1.jar;../lib/geronimo-stax-api_1.0_spec-1.0.1.jar;../lib/log4j-1.2.15.jar;../lib/log4j-1.2.16.jar;../lib/mysql-connector-java-3.1.14-bin.jar;../lib/mysql-connector-java-5.1.30-bin.jar;../lib/poi-3.16-20170419_modified_talend.jar;../lib/poi-ooxml-3.16-20170419_modified_talend.jar;../lib/poi-ooxml-schemas-3.16-20170419.jar;../lib/poi-scratchpad-3.16-20170419.jar;../lib/simpleexcel-1.1-20170714.jar;../lib/talend_file_enhanced_20070724.jar;../lib/xmlbeans-2.6.0.jar;etl_spot_0_1.jar; nuevo.etl_spot_0_1.ETL_Spot --context=Default  --context_param FileExcel="C:/Users/MariaPaula/Documents/Archivos_TESIS/ArchivosPrueba/Spot-fwdxlsx.xlsx" --context_param archivo_DecimalSeparator="." --context_param archivo_Encoding="windows-1252" --context_param archivo_File="C:/Users/MariaPaula/Downloads/Spot-fwdxlsx - VCarga Inicial (1).xlsx" --context_param archivo_FirstColumn="1" --context_param archivo_Header="1" --context_param archivo_LastColumn="" --context_param archivo_ThousandSeparator="," --context_param host="localhost" --context_param DataBaseName="prueba" --log4jLevel=Info --illegal-access=warn
[INFO ]: nuevo.etl_spot_0_1.ETL_Spot - TalendJob: 'ETL_Spot' - Start.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.poi.openxml4j.util.ZipSecureFile$1 (file:/C:/Users/MariaPaula/Documents/Archivos_TESIS/Jobs%20funcionales/Viernes27/ETL_Spot8/lib/poi-ooxml-3.16-20170419_modified_talend.jar) to field java.io.FilterInputStream.in
WARNING: Please consider reporting this to the maintainers of org.apache.poi.openxml4j.util.ZipSecureFile$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[ERROR]: nuevo.etl_spot_0_1.ETL_Spot - tFileInputExcel_1 - java.lang.ClassCastException: org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream cannot be cast to java.base/java.util.zip.ZipFile$ZipFileInputStream
java.lang.ClassCastException: org.apache.poi.openxml4j.util.ZipSecureFile$ThresholdInputStream cannot be cast to java.base/java.util.zip.ZipFile$ZipFileInputStream
[INFO ]: nuevo.etl_spot_0_1.ETL_Spot - tFilterRow_1 - Processed records count:0. Matched records count:0. Rejected records count:0.
[INFO ]: nuevo.etl_spot_0_1.ETL_Spot - tFilterRow_2 - Processed records count:0. Matched records count:0. Rejected records count:0.
[INFO ]: nuevo.etl_spot_0_1.ETL_Spot - tFilterRow_3 - Processed records count:0. Matched records count:0. Rejected records count:0.
[INFO ]: nuevo.etl_spot_0_1.ETL_Spot - TalendJob: 'ETL_Spot' - Done.

 

 

Moderator

Re: How to use a context Variables? I have a problem

Hello,

You can define parameters as context variables then pass values from the command line using the following syntax for each parameter:
--context_param yourParameter=yourValue

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.