Append file name as value in column

3 posts / 0 new
Last post
Mutombo
Offline
Joined: 08/31/2023 - 06:11
Append file name as value in column

Hi!
I'm looking for a script that would append additional column into my ile with values equal to source file name.
In my example I have text files e.g.  20230831.txt with one column of data.
I would like to import this file into IDEA and have to column of which one would store in every field value "20230831".
If there would be a way to import multiple file this way at the same time that would be excelent! :)
 
Thanks in advance for the help!
Regards,
Maciej

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Mutombo,

If you go to IDEA Passport you can download and install the SmartAnalyzer Utilities application:

In the package there is a utility called the multi-file import, this has an option to add a filename field when you perform an inport. 

The is also another utility that allows you to do this for files that have already been imported:

Mutombo
Offline
Joined: 08/31/2023 - 06:11

Thank you very much Brian!