Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

convert csv file rows to java map

I'm working on a medium to large size csv file. i want to transfer each row in the csv file to a java map. i have done some initiative, please see the attached job.
The problem is i'm unable to convert tMap's output table to direct java map. currently, i'm manually assigning each column to a java map (inside tJavaRow_1).
Is there any workaround for this?
appreciate your response.
0683p000009MCrd.png
Labels (4)
3 Replies
Anonymous
Not applicable
Author

I'm not entirely sure I understand correctly, but maybe tJavaFlex is a possible solution for you?
If not, please be more specific about your input schema and the details about your output object.
0683p000009MCrp.png
Anonymous
Not applicable
Author

Hi rretzbach,
Thanks for your input. however, your solution doesn't fit for me. I'll detail my issue.
i have files in a folder. i have to convert each row in files to a java map for my processing. as you can see in previous diagram, i'm transferring row/column combination through tMap and then passing to tJavaRow. then the java code will convert to a map.
please see the attachments for more clarity.

as you can see i have to hardcode, "column name" to java map. this seems bit ugly for me. what i want is a simple solution as;

java.util.Map<String, String> newMap = (java.util.HashMap)tMap;

is it possible? or can you suggest me a better way to achieve this.
0683p000009MCiS.png 0683p000009MCw0.png
Anonymous
Not applicable
Author

Hi,
I have managed to find a solution through browsing the forum. thanks you very much.
see my attached screen shots.
0683p000009MCsN.png 0683p000009MCWL.png