ETL/SQL or Beast Mode Data Merging Assistance
Hi,
I need some assistance regarding the best way to perform the following. We have a report which is updated quarterly. On this report are numerous metrics of different types (strings, numbers, etc.). We need to be able to create a recursive dataset where we can (in HTML Table view) see a side-by-side comparison of the latest 4 quarters and some additional columns shared across the dataset.
In the past, we just created a separate dataset for each quarter but I feel this defeats the purpose. Additionally, we now have API access to our product and can now automate sending data into Domo.
What I've tried so far (testing 2 quarters only):
I was able to create a recursive dataset using ETL and removing duplicates based on two columns (metric_id and last_measurement_date). This worked fine in one card where none of the data for the most recent quarter had been submitted yet after using beast mode and CASE WHEN to filter the dates for the two columns.
When I tried this with data that had been updated, I realized there were duplicate rows.
I guess my question is, what way should I be doing this? I'm not great with SQL but can do standard joins. The only two columns in this dataset where values should change are the last_measurement_date, current_metric_rating, and most_recent_value. All other columns including the metric name, metric ID, low, moderate, and high columns should not change.
Happy to provide more info if needed. Thanks in advance for the help.
Comments
-
it's unclear to me what you mean the rows are duplicate.
does the underlying data actually contain duplicate rows? or do you mean, you have more cards in your visualization than you expected?
If it's the later, i'd guess you have Date in Sorting (or a similar period based column)
I'm guess that because adding a field to the ORDER BY will also add it to the GROUP BY clause in SQL thus generating rows for each period instead of collapsing the data to one row for each Metric (and using your columns to show the desired results).
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"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.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 58 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 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