Need to change the name of a column in an existing table in Keboola and don’t know how to do it? Below you will find even 3 ways to do it.
Keboola serves as an end-to-end data management solution. From extracting data from multiple sources, to data transformations, to storing data in a data warehouse and then preparing a reporting layer for any visualization tool. What it doesn’t allow, however, is to directly rename columns in existing tables. This tutorial will walk you through a solution to achieve this. This can be especially useful when aligning your data schema with evolving business needs.
The first and essential prerequisite for changing the column name is to have an active Keboola account and to know the tool at least at a basic user level.
This method of renaming a column uses the Keboola Transformation.
In the “transformations” section of the Keboola project, create a new transformation – SQL, Python, R, etc – the choice depends on your preferences and current setup.
Write a script that extracts all the data from the original table, but renames the desired column.
Always back up your data and create a snapshot before making schema changes.
Document the changes for future use and communication within the team.
After the transformation is complete, verify that the table has the column renames as required.
Does not require manual data transfer;
Integrates seamlessly into existing pipelines.
May require advanced SQL or programming skills; can be resource intensive for large data sets.
The next method is briefly as follows – export the table, rename the column using a third party tool and then import it back into Keboola.
Export data from an existing table in Keboola to CSV or other suitable format.
Use a data manipulation tool to rename the column (simply type the column name in Microsoft Excel, Google Sheets or via a Python script).
Save the modified data as a CSV.
In Storage-i in Keboola, upload the new table as a CSV (note the separator option). Replace the original table with the new one wherever the original one entered and delete the original one.
It allows flexible and visual manipulation of data; it can be easier for users who are familiar with tools such as Excel.
Time consuming for large data sets; not automated.
If you don’t need to change the names in the whole data warehouse, but it is enough to rename the column at the writer level, you don’t need to export and upload any data.
In the “Components” section, locate your Snowflake writer. In “Tables” choose the “Name” of the table with the column you want to rename.
In “Column Name” type the name you want. *this name is not overwritten in Keboola Storage, but only exists in this particular writer.
Each coin has two sides. According to Petr Šimeček, one of the founders of Kebool, it is a more complex technical problem than it may seem at first glance. “Renaming (potentially) breaks a lot of things around and requires changes in input mapping and code.” Simecek says.
Each method has its advantages and disadvantages. The choice depends on the specific requirements of the project, the volume of data, and the technical expertise available. For example, if automation is critical or you have a giant table, using transformations within Keboola is more appropriate. Conversely, for smaller datasets or one-off jobs, third-party tools might be easier to access.
Need help setting up, pricing or implementing Keboola?
We’re here for you.