openmolecules.org

 
Home » DataWarrior » Functionality » Renaming column
Renaming column [message #2242] Mon, 22 July 2024 14:48 Go to next message
slprakash is currently offline  slprakash
Messages: 2
Registered: July 2024
Junior Member
I have loaded data from SQL Database. I want to rename multiple columns without manually renaming. Is there a way to automate the renaming process if I have a mapping document (which will have new name and old name in the format <old name> as <new name>)
Re: Renaming column [message #2248 is a reply to message #2242] Mon, 22 July 2024 17:15 Go to previous message
thomas is currently offline  thomas
Messages: 684
Registered: June 2014
Senior Member
Columns cannot be renamed, because the original column name is used in many places to refer to a column. You can add an alias, though. This causes to display the alias instead of the original column name.

Currently, you cannot set column alias defined by a mapping file. But maybe you can do one of these as a workaround:
- define target column names in the SQL statement as: SELECT user_id ID, user_name Name FROM ...
- run a macro (dwam) or apply a template (dwat) to define aliases for you dwar document
Previous Topic: Embedding credentials
Next Topic: red slide rule after applying filtering macro on EL -- warning, or error?
Goto Forum:
  


Current Time: Sat Jul 27 22:29:47 CEST 2024

Total time taken to generate the page: 0.03145 seconds