How do I change the field type for a column on an existing table?
My company recently released a new version of our online platform and I am mapping its new database fields to my already existing Domo reporting tables. In the previous system we used a simple integer as the primary key for all of our tables. In the new version we have switched to UUID values for many of our tables. Consequently, when I import into Domo I need to put UUID values into what was previously an integer field. The easiest way to make this happen is to alter the existing Domo tables and change the integer fields to text. I'm hoping this will allow me to continue to use the existing Domo tables and minimize any impact on associated data transforms and cards.
Is there a way to edit the schema for an existing Domo table and transform a single column? Changing an integer to text should be simple. I would love to perform a one-time alteration rather than build a separate import and transformation workflow to make my new data schema integrate with my historical data.
Best Answer
-
It turns out that I did not need to manually alter the table that I was importing into. I changed the SQL in my import for the table to pull from the new data source and tried putting the new UUID values directly into the existing integer field. The Domo importer was smart enough to detect that non-integer values were being added to the integer field. It automatically changed the data definition for the identifier column from an integer to a string to accommodate the UUID values I started passing in.
1
Answers
-
@hanmari You should be able to add an Alter Columns tile to your existing dataflows to change the field from an integer to text. If this field is used in existing joins, then you will need to change the datatype for both sides of the join. I would not anticipate that this would cause a significant impact to existing cards, though I recommend using the "Cards" tab on the output dataset to verify that none of them break.
1 -
It turns out that I did not need to manually alter the table that I was importing into. I changed the SQL in my import for the table to pull from the new data source and tried putting the new UUID values directly into the existing integer field. The Domo importer was smart enough to detect that non-integer values were being added to the integer field. It automatically changed the data definition for the identifier column from an integer to a string to accommodate the UUID values I started passing in.
1
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