Magic ETL - Change column types and merge files
Hi, I am merging 7 data sets into one. I would like to change the column types on all 7 of the source files before merging into the output data set.
2 columns in each file are "text" columns, but I wish to change them to date type.
Some of the data contains "n/a" as a string. When I ran a simple Set Column Type ETL on this field, the "n/a" prevented the conversion.
I am applying a value mapper to both text columns containing the date (but with column type "text") to convert the "n/a" string to an arbitrary date (e.g. 1970-01-01).
Then I am applying the Set Column Type transformation to change those columns to column type date. After that I run an append rows transformation to complete the ETL and populate the Output file. See below a snippet of the Magic ETL.
When I run this, the ETL creates 2x the number of rows vs. the sum of the original 7 datasets.
Any ideas why this is and how I can achieve my goals (replace column types for 2 columns and combine all 7 sets)?
Many thanks
Best Answer
-
Based on your screenshot, your dataset is doubling because you are sending the entire dataset to Value Mapper 2 and the entire dataset to Value Mapper 9. In order to avoid the duplication, move your Value Mapper 9 and and Set Column Type 2 to be after Set Column Type 9 so that your source data is not being split out.
Also, you could do this work after your append your 7 datasets together so that you are not having to repeat this work for each dataset. This would make it easier to maintain.
Finally, Magic ETL 2.0 will make this kind of work much easier because they have added a formula tile where you could do the replace and make it a date type all in one tile. You can talk to your CSM to see if that can be turned on in your instance. It is currently still in Beta.
**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
Answers
-
Based on your screenshot, your dataset is doubling because you are sending the entire dataset to Value Mapper 2 and the entire dataset to Value Mapper 9. In order to avoid the duplication, move your Value Mapper 9 and and Set Column Type 2 to be after Set Column Type 9 so that your source data is not being split out.
Also, you could do this work after your append your 7 datasets together so that you are not having to repeat this work for each dataset. This would make it easier to maintain.
Finally, Magic ETL 2.0 will make this kind of work much easier because they have added a formula tile where you could do the replace and make it a date type all in one tile. You can talk to your CSM to see if that can be turned on in your instance. It is currently still in Beta.
**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 Mark. I am running this new structure now as a test.
1 -
Thanks for the help. Fixed
0
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
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 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