You can also choose to save the output file to your local hard drive or directly publish it to a Tableau Server or Tableau Online to share with other Tableau users in your organization. And because the API call has a relative date range (year to date), you can simply keep re-running the flow to update the extract! Running the flow now will give us a hyper-extract that can be used as a data source for your Tableau project. A common use case would be exporting last year’s data for a metric, which you would like to use in a Tableau report, but also appending a daily updated dataset to this to keep it up-to-date.įor example, I configured a query in Query Manager to get Google Ads data for 2020 and downloaded the results as CSV. Imagine having a set of historical data that won’t change any more. For that, instead of just supplying the sample CSV file for Tableau Prep Builder to interpret the API output, we will also use it as a means to import static data. The first thing we can do is perform a UNION operation. Append data from Supermetrics to a CSV dataset (UNION) Now, let’s explore some functions in Tableau Prep Builder you can use to leverage your data for analysis. If you need to change the shape of the data, remember to change the CSV file accordingly so that Tableau Prep can interpret the API response. If you’re using our short URLs, you can find out how to edit parameters in this documentation article.Īs long as you don’t change the shape of the data by adding or deleting columns, you can play around with the results. Otherwise, you can use this data input element in the Tableau flow as you like. You can easily control what data to load through Supermetrics API by editing the API link. Leverage your data in Tableau Prep Builder Once these settings are done, Tableau Prep should immediately start executing the Supermetrics API query, and data will appear in the preview window.Ĭongratulations! You have just successfully loaded data from Supermetrics API to your Tableau Prep flow. You’ll see your data in a preview table and raw JSON format. Continue building your query by filling in these fields: In this example, I’ll use Google Ads as a data source. You’ll see a sidebar on the left of your screen. Then, choose ‘Integrations’ > ‘Query manager’. If you don’t have a license yet, start your 14-day free trial. Note that you can access the Supermetrics Query Manager with a valid Supermetrics API license. Let’s generate an API link in Supermetrics Query Manager next, and while we’re there, we will also download a sample of our data in CSV format. We’ll be using this in the following steps. py extension somewhere where you will easily find it again. Return pd.DataFrame(results, columns=results) You can find the required option in the ‘Help’ menu of Tableau Prep under ‘Help’ > ‘Settings and Performance’ > ‘Manage Analytics Extension Connection’.įor this guide, we assume you are setting this up on your local machine, so all you need to do is make sure that TabPy is still running and that the port you see in the window matches the port that TabPy is listening on. The final piece of prep for TabPy is to configure the connection to it in Tableau Prep Builder. It’ll tell you that it’s running and listening for incoming requests from Tableau on port 9004. Once the installation is complete, you can start using TabPy by running the background process in a terminal window. Of course, you will need a recent version of Python for it to work. You can find the installation instructions on the package’s Github. It lets you run Python scripts right inside Tableau dashboards or, and most importantly for our case here, inside Tableau Prep Builder. TabPy is the second component that we need for this solution. All you need to do is download it from the Tableau website, install it on your computer, and finally, enter your license key or start the free trial. Since Tableau Prep Builder is available in the Tableau suite, you may already have access to it. The result is the output of your data set in Tableau Hyper Extract - which is optimized for building reports in Tableau. That way, you’ll be able to follow what’s happening with your data and identify errors quickly. The best thing about Tableau Prep Builder is that it lets you visualize all your data transformation operations. Tableau Prep Builder is a data transformation tool that Tableau released in 2018 to help its users clean and prepare data for analysis. Sounds good? Let’s get started! Step 1: Install Tableau Prep Builder When we’re done, you’ll be able to combine the output of Supermetrics API queries with other data sources via Union and schedule an incremental refresh of a Tableau extract with data from our API.
0 Comments
Leave a Reply. |