Mass Renaming Columns
Is there any way for me to mass rename columns? Instead of going into the "Select Columns" tile and going down the list 1 by 1 can I copy paste a text file somewhere that will do this? In any other case I would be fine renaming, but right now my dataset has an output of almost 700 columns.
Best Answer
-
One option would be for you to select the select columns tile and the tile before and then choose the "copy to clipboard" option and pasted it into a text editor. It is JSON formatted data, so you could add in all your fields in your text editor and then paste it back into Magic ETL. Here is what the select columns tile looks like in a text editor with just a single field added called "name"
{ "name": "Select Columns", "id": "42981323-1821-44aa-835d-06815d117720", "type": "SelectValues", "gui": { "x": 252, "y": 108 }, "dependsOn": [ "e445a86c-6759-445b-a096-b4c5063e6575" ], "removeByDefault": false, "notes": [], "fields": [ { "name": "name" } ] }
Hope this helps.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.4
Answers
-
One option would be for you to select the select columns tile and the tile before and then choose the "copy to clipboard" option and pasted it into a text editor. It is JSON formatted data, so you could add in all your fields in your text editor and then paste it back into Magic ETL. Here is what the select columns tile looks like in a text editor with just a single field added called "name"
{ "name": "Select Columns", "id": "42981323-1821-44aa-835d-06815d117720", "type": "SelectValues", "gui": { "x": 252, "y": 108 }, "dependsOn": [ "e445a86c-6759-445b-a096-b4c5063e6575" ], "removeByDefault": false, "notes": [], "fields": [ { "name": "name" } ] }
Hope this helps.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.4 -
Wow... just tested this on a small scale (due to there being 700+ columns browser keeps freezing on me anytime I open up that tile lol) and it worked like a charm, thank you... I will comment on here again if I end up needing more help lol @MarkSnodgrass
1 -
Post from a while back, but I am trying to do the same thing essentially. I am connecting several sheets and there are a lot of overlap between column names. I'd like to add a prefix to each column header so I know which sheet it came from. So something like column 'date' for each sheet would have A_Date, B_ Date, C_ Date. Assuming I am going to need to do each sheet separately in the ETL, but changing in bulk would save me a bunch of time.
I have two tiles, the inputdata tile and then the select columns tile. In the select columns tile I selected 'all columns' then copied and the two tiles into MS text editor. Looks something like this:
{"name":"Date"},{"name":"Invoice #"},{"name":"VV#"}
I am not sure how to tell it to change these names from this point or if I even did that step correctly.
0 -
Sounds like you are going to want your select columns json data to look like this:
{"name":"A_Date"},{"name":"A_Invoice #"},{"name":"A_VV#"}
One easy way to do this in a text editor would be to do a find and replace and replace "name":" with "name":"A_
This should prefix each of those columns with A_
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
Thanks much. Boy that is for sure finicky, but sure appreciate the help. I don't know much about coding at all so took me a while to figure out what is going on.
Thanks @MarkSnodgrass @Jmoreno appreciate the help!
For anyone coming into the thread later down the road like me who is not great at coding this is what I ended up doing:
- Take the basesheet tile and add select columns tile to the ETL (Don't add any columns to the select columns tile)
- Select both tiles and 'copy'
- Past into a text editor
- At the end of the code you will see "removeByDefault":false,"notes":[],"fields":[ ]}]}
- Will need to past all your new column names in this format between the [ and ] after "fields". Example: {"name":"Hazardous","rename":"PTR_Hazardous"},
- Copy all the text and past back into the ETL, it will add two new tiles. Delete the base sheet tile (its blank) and then reconnect your base sheet to the newly created select columns tile. Then can delete the original select columns tile that is also blank.
Most difficult part was getting all the old and new names into this format to be able to paste it in. I ended up doing it in excel and then adjusting it when I pasted it into the text editor
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