Adding an "Activity_Date" to a nightly refresh dataset.
I just set up a connection for a dataset that doesn't have any fixed 'date' column. The only date column it will have will be the batch_last_run date. On a nightly basis this dataset will append and start to build history. How can I add a new date column in a format such as 'Jul 1, 2021', so that the new data and old data have a correlating date?
Best Answer
-
@user048760 I use that same connector with the append and I use the batch_last_run to identify the groups and when they were added. There are a variety of date format options you can use in the Analyzer and in Magic ET if you want to get rid of the time portion of the batch last run column. In Analyzer, when you add the field to the chart, you can choose Format - Date Shorthand.
You can also create a beast mode and use the DATE() function to extract the date portion of the field.
In Magic ETL, you can set the column type to Date.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Answers
-
Hi @user048760
You'd need to utilize a date tile or formula tile to assign the current timestamp in a Magic ETL DataFlow.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@GrantSmith wouldn't that update all rows with the current timestamp rather than just the latest rows that were appended? It seems like you would need to utilize a recursive dataflow to apply the current date to the new rows that were appended.
@user048760 Which connector are using to bring your data in? There are a couple connector types that allow you to add a timestamp date on the new data on import, but I am not remembering which right now.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
@MarkSnodgrass The data is coming in through an email connector in an xlsx format.
0 -
What exactly are you wanting this date to represent? As you said you already have the batch last run date to show when that group of data was imported. Are you just wanting to reformat the date?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@user048760 I use that same connector with the append and I use the batch_last_run to identify the groups and when they were added. There are a variety of date format options you can use in the Analyzer and in Magic ET if you want to get rid of the time portion of the batch last run column. In Analyzer, when you add the field to the chart, you can choose Format - Date Shorthand.
You can also create a beast mode and use the DATE() function to extract the date portion of the field.
In Magic ETL, you can set the column type to Date.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
@GrantSmith Yes, essentially have a date column in a different format. Batch last run, along with a Month Day Year format.
@MarkSnodgrass By doing this in ETL, would I have to pull in the Date operations tile to set the column type or is that something I could just go in, click something on the column and select what column type?
0 -
@user048760 If you have the Magic ETL 2.0 beta, you can set as Date when you click on the input dataset configuration. If you have the regular Magic ETL, you would add the Set Column Type tile and select your column and tell it to use the type of Date.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
If you just want to display your date in a different format you can utilize the DATE_FORMAT function within a beast mode:
DATE_FORMAT(`dt`, '%b %d, %Y')
This way you have a single date column in your dataset and don't need to worry about maintaining both throughout your ETL process.
See https://www.w3schools.com/sql/func_mysql_date_format.asp for more information on the formatting codes
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive