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

[resolved] Filling columns in a database table from the current file name

I am using tfilelist to iterate through a list of files with a fixed name pattern "A_B_C_D_E.xlsx". I have some columns in my database table out of which 5 columns need to be filled with the values A, B, C, D and E. How can I do this?
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Ma'am,
I have already figured a way around my problem. I was processing all the files in my folder which contained the files in a fixed format (5 attributes delimited by an underscore). I had to upload the files to a database table containing 42 columns, out of which 5 columns were to be filled by the delimited attributes in the current filename. I used 5 global context variables for the 5 attributes, and then, used "CURRENT_FILEPATH(Flow)" from the "tFileList" component. Using a "tjava" component to split the current filename and assign the attributes to their corresponding values, I then used the values of these attributes in the output of tMap. 
Thank you very much for the reply, anyway. 

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi,
I have some columns in my database table out of which 5 columns need to be filled with the values A, B, C, D and E. How can I do this?

Could you please elaborate your case with an example with input and expected output values?
Best regards
Sabrina
Anonymous
Not applicable
Author

Ma'am,
I have already figured a way around my problem. I was processing all the files in my folder which contained the files in a fixed format (5 attributes delimited by an underscore). I had to upload the files to a database table containing 42 columns, out of which 5 columns were to be filled by the delimited attributes in the current filename. I used 5 global context variables for the 5 attributes, and then, used "CURRENT_FILEPATH(Flow)" from the "tFileList" component. Using a "tjava" component to split the current filename and assign the attributes to their corresponding values, I then used the values of these attributes in the output of tMap. 
Thank you very much for the reply, anyway. 
Anonymous
Not applicable
Author

Hi,
Thanks for posting that you have resolved your issue and sharing your solution with us.
Best regards
Sabrina