[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?
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.
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.