Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Below is my job design,
tFileInputDelimited_1 -> tFlowtoIterate_1 -> tJavaFlex -> tFileInputDelimited_2 -> tJavaRow -> tFlowtoIterate_2 -> tHiveInput -> tFileOutputDelimited_1
I am setting a context variable as below in the tJavaRow.
System.out.println("Value Of Input: "+input_row.table_name);
globalMap.put("varTOP", input_row.table_name);
System.out.println("Value Of GlobalVar: "+globalMap.get("table_name"));
My problem is,
I need to send the context value of "table_name" dynamically to tFileOutputDelimited_1 and append along with each output record.
eg:-<table_name>-<result_set> ( i am using the delimiter as "-")
emp-1-firstname-lastname-3545-address-phone-email
dept-1-hghg-jkh-546-dpet-trtr
..
..
Please suggest how to send that contextVariable and append in the tFileOutputDelimited.
Why don't you add a pseudo-column to your query with the tablename?
select 'EMP', code, firstname, lastname from EMP;
just add one more column in tjavarow schema and set its value using globalMap.get("table_name") ,
pass this flow as it is to tFlowToIterate and sync this schema to tHive and tfileoutputDelimited