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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive