How to publish empty data set (empty excel sheet) to tableau using Publish to Tableau Macr
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello All
I have designed a workflow which has three publish to tableau macros on it. They are working absolutely fine when they got some data at the input side. Recently, I have ended up in a situation where input data set is empty and the existing data source on the tableau server is not over written with empty data set because of which my tableau report is not showing correctly.
I would like to know how to over write my data source on tableau with empty data set using publish to tableau macro.
Any help is appreciated.
Thanks
Yashwanth
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @yashwanth522,
There does need to be at least one record in order for it to get overwritten. The containing record can all have NULL values or you can UNION a dummy table containing a record so that there's always, at minimum, one going out. However, you will need to make sure your Tableau Dashboard can account for this dummy record appropriately.
A more dynamic approach would be as illustrated below.
Using the "Count Records" tool, this will always generate a record that represents how many records are in the data, including a count of 0 if there aren't any. This is an arbitrary value, but the safest way to ensure one field one record is created and holds no dependencies or requirements to data going into it. I then "Append" the original data to the count.
IMPORTANT:
- Count must be connected to the "Append" tool through the "T" Input anchor
- In the "Append" tool, you'll need to modify the default setting which will "Error on appends of more than 16 records" to "Allow All Appends"
The "Select" tool is optional, but I used it to remove the count field is then used to exclude that count field. Looking at the bottom container, it started with 0 records, but the output generated one record with NULL values.
Benefit of this approach is that if your data DOES have records, it won't generate additional records, as illustrated in the top container, which started with 1 record and ended with 1.
Workflow is also attached for you to review.
Hope this helps!
Jimmy
Teknion Data Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You are awesome man! It worked out great. I should really appreciate the detailed explanation you have provided. Many Thanks.
-Yashwanth
