Demo Marketing Calendar added to DOMO-DOJO
Hi I'm Duncan Domo and I'm new to this!! So hopefully posting in the right place.
Summary: I built a Demo Marketing Calendar added to DOMO-DOJO
I had a problem and I found a solution thanks to a video/advice from @jaeW_at_Onyx
Video: https://www.youtube.com/watch?v=UO9YUfkSh7I watch this if you want to get into complex FY calendars.. my problem was more simple.. But this is fantastic video.. thanks again @jaeW_at_Onyx I thoroughly recommend browsing the channel and watching the Jae shows you how vids...
Problem: want to display marketing activities on DOMO calendar but only takes one date argument (great for webinars, not good for events that have start / end date)
Solution: Explode start / end date into rows per day (3 day event = 3 rows)
By joining to a "SQL numbers table"
I also did a hyperlink in a table for a fictional activity URL link for fun.. so it's 3 demos for the price of 1 today.
Part 1 - Create the SQL numbers table
Solution run stored proc in SQL transform with double while loop
See: https://domo-dojo.domo.com/datacenter/dataflows/47/details#history
Step 1 -
step 2 - this uses 1 based index as for date handling - you could change this to start at 0 for other things
step 3 call it - you can amend the number if you need bigger numbers.. or if you need crazy big numbers talk to @jaeW_at_Onyx who can do magic maths with cross joins..
step 4 - select * that bad boy into an output table..
Bing bang bong, you can join to that table anytime you need to explode a date range.. read on...
Part 2 - Explode the date range (take cover) using ETL
See: https://domo-dojo.domo.com/datasources/0d91fd99-8bb2-4c2e-b96b-daa6fd421770/details/overview
1. First calculate the number of days of event (using date diff)
2. Join number of days to you SQL numbers table
3. Calculate "display date" by adding day number to start date.. BOOM you are calendar ready
Note: I split the dataset in two, one set are single day activities (emails), one set are multi day events (get the above treatment), then I append them back together before outputting the final dataset
step 1
Step 2
Step 3
Finally, put it all back together and output the result..
Part 3 - Output to calendar dashboard, the finished package..
- Display StartDate (adjusted above to be a logical display date, could put in an extra column)
- Add a HTML table to make a clickable link for activity
Step 1 - Chart type = Calendar
Step 2 - HMTL table with a beast mode that adds <a> </a> tags round some data
Part 4 - finally put it all together on Dashboard and config interaction behaviour
Interation behaviour..
card 1 =
Card 2 =
And that's it.. you now have a Marketing activity calendar which explodes multi-day activity day data into rows per day..
That's it.. hope you like it.. My first full solution.. so I'd love some feedback, so if you used it / liked it, please give it a like.. if not, drop some comments below with some suggestions.
Enjoy,
Duncan Domo
Comments
-
Hey @DuncanDomo
Thanks for the contribution. Great writeup. One question I had was have you thought about just doing a join on the date table and your start and end dates?
select * from calendar_dates d left join events e on e.start_date >= d.date and e.end_date <= d.date
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2 -
Whoop this is amazing @DuncanDomo
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"1 -
Cheers @jaeW_at_Onyx, all credit to your YouTube video...
Cheers @GrantSmith, ohhh I love that idea about a Date Table.. I need to make one those now.. and have a play.. I guess I need to watch that Jae video again and finish doing the whole solution... I'll have a play with both ideas.. I have a feeling your solution might win the day for my final real thing.. Thanks again for the idea..
0 -
Anyone interested in an alternative approach.. I implemented @GrantSmith's idea in the DOMO Dojo instance..
Step 1 - build 2021 calendar using the above integer explode technique..
see: https://domo-dojo.domo.com/datasources/0d91fd99-8bb2-4c2e-b96b-daa6fd421770/details/overview
I added a new flow / output to generate every day of 2021 as a table, using webform as input for "year end/start".. like this:
The output looks like this..
Then we are ready to do the SQL Transform to do @GrantSmith's idea..
See: https://domo-dojo.domo.com/datasources/19a238ec-0b15-46dd-addf-f7a9b247730d/details/overview
Step 2 - add a SQL transform (table type) and output table
Here's the SQL Select..
I didn't duplicate putting this on a calendar control as the result from that point on is exactly the same as the original demo above.
Again full credit to @jaeW_at_Onyx for his video about creating an FY calendar, this one: https://www.youtube.com/watch?v=UO9YUfkSh7I. I used that to build the date dimension in step 1.
And of course @GrantSmith for the SQL / date dimension idea
Now, the tricky bit the pros and cons of each approach?? I'm not sure which is best?? Anybody want to comment?
My quick thoughts are:
- SQL numbers explosion = good because all done in ETL so user friendly
- Join to Date Dimension = good because it elegant and less steps. Also has the advantage of being able to store "day info" on the date dimension table that might be useful, like FY Period Week, FY Period Month, TimezoneOffsetinUK, TimezoneOffsetinUSA for every single day of the year
So due to the DateDimension additional info, I might lean towards the Join to DateDimension solution as better real world solution.. Love to hear your thoughts on pros/cons?
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.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