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
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 813 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive