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.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