GROUP_CONCAT function in Dataset View vs MySQL Dataflow
I have created a MySQL Dataflow where I was able to successfully use the GROUP_CONCAT function. It is preferred that I use a Dataset View in this circumstance since the underlying data is coming from AppDB and therefore updates every 15 minutes if there is new data. I have copied and pasted the exact query that is successfully running for the MySQL Dataflow. I have updated the dataset names to the aliases that the View uses. But I am getting an error. Of course the errors in SQL Editor for views are completely useless. I assume it is due to the GROUP_CONCAT function. Is it not supported for views? Below is the query I have successfully running for the MySQL Dataflow
SELECTRECORDNO
,Location ID (ARDetail)
,Department ID (ARDetail)
,Customer ID (ARRecord)
,Invoice Number
,
GROUP_CONCAT(
CONCAT(date
,' - ',IFNULL(Name
,user
),': ',postBody
)
ORDER BY DATE(date
) DESC
SEPARATOR '\r\n') AS Notes
,
MAX(date
) AS Most Recent
FROM collection_notes_dataset
LEFT JOIN users
ON collection_notes_dataset
.user
= users
.User ID
GROUP BYRECORDNO
,Location ID (ARDetail)
,Department ID (ARDetail)
,Customer ID (ARRecord)
,Invoice Number
Best Answer
-
The "Add Column" group by option for combining strings uses the comma as a separator, but the "Add Formula" option allows you to use the group_concat formula you've already written.
1
Answers
-
AFAIK dataset views do not have this functionality.
I do believe you can do this in Magic ETL using a Group By formula, which might be fast enough for your needs depending on the size of your inputs.
0 -
Unfortunately the only option for a separator is a comma. The test I am separating already has commas and therefore it makes it less legible. Using the MySQL Dataflow I am able to use \r\n which acts as a line break. Thanks!
0 -
The "Add Column" group by option for combining strings uses the comma as a separator, but the "Add Formula" option allows you to use the group_concat formula you've already written.
1
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
- 57 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
- 394 Distribute
- 113 Domo Everywhere
- 275 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