Search code examples
pythonpandasdataframetableau-apihyper-api

How to convert a Tableau .hyper File to a pandas dataframe?


I want to convert a Tableau .hyper file to a pandas dataframe. It is possible to convert a dataframe to a .hyper file, but unfortunately, I could not come up with a solution for this problem. How can you achieve this with python?


Solution

  • For a one-time conversion, you can connect to the hyper extract with Tableau Desktop, and then export to CSV from the data menu.

    If you want to automate a repeatable process that doesn't require manually using Tableau Desktop, have your data provider supply the data in CSV or another format.

    Tableau did not initially provide a public API to read from hyper extracts, just to create them. (Presumably, they preferred that people use Tableau to read from the extracts.)

    In late 2019, Tableau released an extended Hyper API that now allows programs to read from Hyper extracts

    Still Tableau extracts are usually used as efficient mirrors of an original data source - not as a definitive source - much like a materialized view in a database reflects underlying tables. As the API matures, other uses cases may get more prominent.

    Two other options to explore depending on your use case that can let you generate Tableau extracts under program control.