Add CSV filename as column
I am running a few workbench jobs, and I need to able to add the file name from each CSV in the folder I'm loading. When you create a workbench job using an xlsx file, you have the option to check a box to add the file name. But for CSV there is no option I can see. Is there a way through calculated columns or any other method to add the file name? Seems like this should be possible.
Answers
-
Thanks for the question.
In Workbench job settings, you can add a file name for a CSV file (single file name per job).
To accomplish what you want, you want to use a Workbench feature called “Data Sync”
To access Data Sync from Workbench:You can add as many files as you want, and Workbench will watch the folder and upload when there is a file change (timestamp or other change), workbench will upload the changed file.
If I have answered your question, please click "Yes" on my comment option.
0 -
I need to batch the files from a single folder, so this won't work for me. There should be a check box just like in the excel transport type. Thanks for your response, though!
0 -
If all the files are identical (they must have the same column layout (schema), but the file names can be different), do not use a file name at the end of the Source Edit path. In my example, the path is C:\
Any file in that path that is a CSV file will be used to create a single Workbench job (TIP: Put the files into a separate directory and use that directory as the Source path to the files in the directory. Any change to any file will cause a batch run of all files in the Source directory.
If I have answered your question, please click "Yes" on my comment option.
0 -
That did not answer how to bring the file name in as a column value.
0 -
Data Sync is a terrible option! It creates a new dataset for every CSV in the folder! I just had to delete over a hundred datasets after testing to see what data sync does. It also does not bring the filename in as a column, I do not see a way to dynamically assemble all the data from all the CSVs into a single dataset that includes the file name. the files would constantly have to be added to a dataflow…
our situation … each csv is a report for a single day… 1-june-2023-report.csv etc… that June 1 date is not in the data. I need it to be a column in my dataset.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive