Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there a way we can define & pass multiple values to a context? e.g
context.brand_id=(1,2). how to define this in contexts tab? context.brand_id= "1|2"?
@snayak : i know its simple . since I am new to talend, i am not getting it correct. some small mistake is happening somewhere. can you please point out that to me?Please find the context file attached along with other screenshots such as job design, error message and tfileinputdelimited datatype defination.
can you please point out the error to me?
@snayak : i know its simple . since I am new to talend, i am not getting it correct. some small mistake is happening somewhere. can you please point out that to me?Please find the context file attached along with other screenshots such as job design, error message and tfileinputdelimited datatype defination.
can you please point out the error to me?
@sushantk19 , what are you doing in tMap2,can you share screenshot of tMap2? the error you are getting is compilation error not run time error. you have not configured correctly for one or more columns.When comparing strings you should use equals instead of == . One more thing that let have below way. not needed context. .
prodcat_mia1;6
prodcat_mia1;7
@sushantk19 , what are you doing in tMap2,can you share screenshot of tMap2? the error you are getting is compilation error not run time error. you have not configured correctly for one or more columns.When comparing strings you should use equals instead of == . One more thing that let have below way. not needed context. .
prodcat_mia1;6
prodcat_mia1;7
@manodwhb : please find attached the screenshot for tmap2. Based on product categories and date interval, we are calculating the VAT rates. For product category 7 and 8, the calculation is same. Hence i want to pass both these values in a single context.
When i run the job with above suggestions , i get the below error:
Couldn't parse value for column 'value' in 'row13', value is 'prodcat_mia1'. Details: java.lang.NumberFormatException: For input string: "prodcat_mia1"
Couldn't parse value for column 'value' in 'row13', value is 'prodcat_mia1'. Details: java.lang.NumberFormatException: For input string: "prodcat_mia1".
i have defined a context with name as prodcat_mia1 in "contexts" tab.
also the tmap logic is as below:
(Load_data.brand_id==context.brand_id_mia && Load_data.country_id==context.country_id && Var.var1 =="Y" && Load_data.productcategory_id ==context.prodcat_mia1)?context.VAT_Reduced_1:context.VAT_Normal_2
the highlighted BOLD part is where i have to pass both the values. the same logic should work for prod category 7 and 8.
@manodwhb : please find attached the screenshot for tmap2. Based on product categories and date interval, we are calculating the VAT rates. For product category 7 and 8, the calculation is same. Hence i want to pass both these values in a single context.
When i run the job with above suggestions , i get the below error:
Couldn't parse value for column 'value' in 'row13', value is 'prodcat_mia1'. Details: java.lang.NumberFormatException: For input string: "prodcat_mia1"
Couldn't parse value for column 'value' in 'row13', value is 'prodcat_mia1'. Details: java.lang.NumberFormatException: For input string: "prodcat_mia1".
i have defined a context with name as prodcat_mia1 in "contexts" tab.
also the tmap logic is as below:
(Load_data.brand_id==context.brand_id_mia && Load_data.country_id==context.country_id && Var.var1 =="Y" && Load_data.productcategory_id ==context.prodcat_mia1)?context.VAT_Reduced_1:context.VAT_Normal_2
the highlighted BOLD part is where i have to pass both the values. the same logic should work for prod category 7 and 8.
@manodwhb : also check if the parameter file defination is correct. parameter file is also uploaded.
@manodwhb : also check if the parameter file defination is correct. parameter file is also uploaded.
@sushantk19 , you need to use the below way. since productcategory_id is a string data type.
Load_data.productcategory_id.equas(context.prodcat_mia1)