Metadata plays a pivotal role in the world of data visualisation and further provides insights in the data-driven decision-making industry. Its importance is clearly evident in popular BI tools such as Tableau. Tableau uses metadata to improve data comprehension, analysis, and interpretation, empowering users to produce smart visualisations and make data-driven decisions. Metadata makes the data findable, accessible, and reusable.
Findable: Metadata facilitates the discovery of pertinent facts. Because it describes in detail what the text document is about, metadata also makes text documents easier to find.
Accessible: Metadata describes how data can be accessed, possibly including authentication and authorization, once a user locates the information they require.
Reusable: Researchers must understand a data set’s structure, the meanings of the language used, how it was acquired, and how it should be read or used in order to reuse it. For data to be repeated and/or merged in numerous contexts, it must be adequately described.
In Tableau, if we want to extract the metadata, there are two options:
Tableau Metadata API: Based on the metadata, all of the information on our Tableau-Online or Tableau-Server can be retrieved, including the workbooks, data sources, flows, and metrics. The GraphQL query language, which is executed by this metadata API, explains how to request and receive only the data about which you are curious.
Using TWB File Conversion: .TWB files are specialised XML files designed to communicate with data sources. We will handle this XML file in this walkthrough because Tableau workbooks contain all of the metadata for reports and dashboards.
Therefore, here we will be using the second option, that is, Using TWB file conversion into XML to view metadata. Further, we decide to have some experiments with the metadata of a twb file. We learned some intriguing things by doing this.
We discovered that by changing a few settings in this xml metadata file, we can change the dashboard visualisations and, in cases where they are missing, add a new dashboard sheet and produce a different visualisation. We can only achieve this by making changes to the metadata file and not even opening the default tableau file.
We have a simple visualisation for a dataset. Below the graph, we have Gender on the X-axis and Total on the Y-axis, and we divided the graph using colour in the form of several Age groups.
This file is in a.twb file; when converting this .twb file into an xml file, we will change the file type to a.txt file. This is like the metadata for the tableau file.
Above is the unmodified.txt file. Experimenting with the metadata, for example: If we plan to change the colours of the AGE group for the visualisation. Below, we have made some modifications to the.txt file.
Once, we converted the edited file from .txt to.twb. We can observe that the bars of the graphs have changed colours.
Harness the power of metadata in data visualization with Tableau. Call us today to book your consultation.
As our Book 1 contains only one dashboard sheet, we will try adding another sheet of visualisation in the form of a Pie Chart. Modifying the original sheet accordingly.
Saving this.txt file into a.twb file for verification.
Learn how to leverage metadata for enhanced data comprehension and insightful visualizations. Start optimizing your data-driven decision-making today!
We discovered how to extract tableau metadata, and if we are able to alter the main tableau file (.twb) by only making a few changes to the XML metadata file, we can add or modify numerous visualisations and sheets without modifying the main.twb file.
By Ankit Kumar Ojha
By Uma Raj