every time i create a dataset batch_id and _batch_last_run columns are generating and while joining
Hi,
every time i create a dataset batch_id and _batch_last_run columns are generating and while joining datasets an error is displaying bcoz of these duplicate columns present in both datasets
is there a way to create a dataset without generating these columns or how to delete it
and one more question
is it possible to change column names after creating a dataset
thank you
Best Answers
-
What type of join are you doing? How are you performing it, ETL, SQL dataflow, fusion? I ask because you should be able to join with both datasets having them, they are standard in Domo and I've yet to run into it. MySQL dataflow join example below
Table 1: "Favorites"
- ID
- Favorite_Color
- Favorite_Food
- UserID
- Batch_ID
- Batch_Last_Run
Table 2: "Users"
- UserID
- Name
- Batch_ID
- Batch_Last_Run
Despite those columns being duplicate if you wanted to join on them you could do
SELECT
f.Favorite_Color
,f.Favorite_Food
,u.Name
,u.Email
FROM Users as u
LEFT JOIN Favorites as 'f' on f.UserID = u.UserID
This shouldn't cause any errors. If you did want to include both batchID and batch last run from both datasets you could just rename them in the select statement
SELECT
f.Favorite_Color
,f.Favorite_Food
,f.BatchID as 'Favorites BatchID'
,f.Batch_Last_Run as 'Favorites Batch Last Run'
,u.Name
,u.Email
,u.BatchID as 'UsersBatchID'
,u.Batch_Last_Run as 'USers Batch Last Run'
FROM Users as u
LEFT JOIN Favorites as 'f' on f.UserID = u.UserID
This should also be possible in ETL by perhaps putting a select columns type of ETL block so you don't even select them prior to joining
**Make sure to like any users posts that helped you and accept the ones who solved your issue.**2 -
You could also use the SQL transform option to drop the columns. (you can only drop one column at a time though)
Create a transform, select the SQL option:
ALTER TABLE `table_name` DROP COLUMN `_BATCH_ID_`;
then drop the other batch field:
ALTER TABLE `table_name` DROP COLUMN `_BATCH_LAST_RUN_`
You can then use
SELECT a.*, b.* from `table_name` a left join `table_b_name` b on a.`id`=b.`id`
without a duplicat column.
Alternatively, you can also remove the columns by clicking on the input data set and clicking on the 'x' to the right (this only works if your field names don't have a . in them):
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman3
Answers
-
What type of join are you doing? How are you performing it, ETL, SQL dataflow, fusion? I ask because you should be able to join with both datasets having them, they are standard in Domo and I've yet to run into it. MySQL dataflow join example below
Table 1: "Favorites"
- ID
- Favorite_Color
- Favorite_Food
- UserID
- Batch_ID
- Batch_Last_Run
Table 2: "Users"
- UserID
- Name
- Batch_ID
- Batch_Last_Run
Despite those columns being duplicate if you wanted to join on them you could do
SELECT
f.Favorite_Color
,f.Favorite_Food
,u.Name
,u.Email
FROM Users as u
LEFT JOIN Favorites as 'f' on f.UserID = u.UserID
This shouldn't cause any errors. If you did want to include both batchID and batch last run from both datasets you could just rename them in the select statement
SELECT
f.Favorite_Color
,f.Favorite_Food
,f.BatchID as 'Favorites BatchID'
,f.Batch_Last_Run as 'Favorites Batch Last Run'
,u.Name
,u.Email
,u.BatchID as 'UsersBatchID'
,u.Batch_Last_Run as 'USers Batch Last Run'
FROM Users as u
LEFT JOIN Favorites as 'f' on f.UserID = u.UserID
This should also be possible in ETL by perhaps putting a select columns type of ETL block so you don't even select them prior to joining
**Make sure to like any users posts that helped you and accept the ones who solved your issue.**2 -
You could also use the SQL transform option to drop the columns. (you can only drop one column at a time though)
Create a transform, select the SQL option:
ALTER TABLE `table_name` DROP COLUMN `_BATCH_ID_`;
then drop the other batch field:
ALTER TABLE `table_name` DROP COLUMN `_BATCH_LAST_RUN_`
You can then use
SELECT a.*, b.* from `table_name` a left join `table_b_name` b on a.`id`=b.`id`
without a duplicat column.
Alternatively, you can also remove the columns by clicking on the input data set and clicking on the 'x' to the right (this only works if your field names don't have a . in them):
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman3
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