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.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 603 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 697 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive