How to bring certain data from one Table to another Table
Hello All,
I am trying to find out an alternative of Vlookup kind of scenario in Domo. I have 2 tables -
- Employee Headcount
- Country Mapping
Employee Headcount Table contains all employee related demographys such as ID, DOJ, DOB, Country, etc. But it does not have Region and Sub-Region data in it.
For that purpose I have a Country Mapping Table and I want to bring Region & Sub Region information from Country Mapping Table to Employee Headcount Table.
I tried Magic ETL (Join & Append) and BLEND but it adds extra rows in the Employee Headcount Table. Tried Inner and Left Outer but same result. From 6.6 M rows it goes to 132 M rows.
Didn't try SQL as I don't know that. CASE fucntion of Beast Mode won't work as my list is dynamic.
Any Help please!!!
Best Answer
Answers
-
How do you know what Region and Sub Region each employee is in?
You're getting extra rows because when you join based on a one-to-many relationship, each sub-region is created as a new record.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@Ankur You will want to do a left join in MagicETL with Employee Headcount as your left table so that you keep all employee headcount rows but not all country mapping rows. If your output still returns more rows than what exist in the Employee headcount, then there are likely duplicates in your country mapping table. You can resolve this by using a Remove duplicates tile on the country mapping before joining.
Here is an article that talks about the difference between the different types of joins and appending:
1 -
@MichelleH you are correct. My Country Mapping Table has duplicate rows but for a reason. But still the row counts should not increase from 6.6M to 132M. My country Table has 679 rows of data.
Country List
Country
Region
Sub Region
USA
USA
NA
NA
United States of America
USA
NA
NA
US of A
USA
NA
NA
UnitedStatesofAmerica
USA
NA
NA
US
USA
NA
NA
United States
USA
NA
NA
UnitedStates
USA
NA
NA
United_States
USA
NA
NA
So, if you ref to the above table, Although the Country is same but its updated differently. In both the Tables I have Country List as the common field / Primary Key.
How to handle it, in this scenario?
0 -
@GrantSmith I know it because Employee Headcount Table contains Country List column against each Employee. I am not sure how the Relationship between Tables work in Domo. In PowerBi we have to manually build the relationships.
So, what would you suggest I should do?
0
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