Welcome to the DataDev Quest Challenge for March 2025! This challenge is designed to teach you how to use VizQL Data Service, Tableau REST API, and Tableau Developer Sandbox to query Sample – Superstore Data source.
Challenge Overview
Objective:
Familiarize yourself with VizQL Data Service, and connect and execute a query to a published data source.
Why this challenge?
VDS is a new technology that allows connecting directly to the Data Source without using the Tableau Interface, which is why it is called Headless BI.
Learning Goals
- Get your Tableau Developer Sandbox
- Configure Personal Access Token (PAT)
- Connect to your Developer Site using Postman by PAT
- Execute a query and return data from a published Data Source
- Use basic Postman for HTTP requests
Submission Guidelines
- Source Code: Publish your project publicly in your GitHub profile
- Add README: Include setup instructions and describe how to run the program.
- Video of Solution: Include a video of your solution in the README file. You can publish it on YouTube and embed the iframe, or save the video file in the repository’s root directory.
- Comments: Ensure your code is well-commented.
- Submission: Submit your challenge in the following **forms**
Additional Resources
- Official documentation VizQL Data Service
- Postman Collection for VDS
- VDS Query Builder by Kyle Massey
- VDS Extend Your Data Beyond Visualizations
- VDS from Tableau: Use Your Data, Your Way
Getting Started
The first step is to get and set up your Tableau Developer Sandbox. My Medium Post provides a step-by-step guide to configuring it.
1. In your Tableau Cloud Site, go to Explore

and open the Folder with the name Samples:

2. Select Superstore Datasource and click on the information icon for details, and copy the LUID

3. Ensure you have enabled the Personal Access Token (PAT) and configured your Personal Access Token (PAT) . If you need help, follow my Medium Post, where I explain how to get it.
Create a token TEST_VDS and copy the Secret value:

4. Open Postman and create a new POST HTTP Request called REST_API_SIGN_IN
As an example, my site is https://10ax.online.tableau.com/#/site/cristiansaavedradx, and the URL that I need to use is https://10ax.online.tableau.com/api/3.24/auth/signin, and my site is cristiansaavedradx
Use your Tableau Cloud address for the API sign-in call and add the headers to support JSON:

For the body, create a raw JSON File equivalent to the following and click Send.

After that will return a JSON file with the Token. Copy to use it in a second page.
{
"credentials": {
"site": {
"id": "99aafaa0-e8e7-4asd-867c-f0666a960008",
"contentUrl": "cristiansaavedradx"
},
"user": {
"id": "413b02ff-2453-4e47-af34-a4e0if0dd4b2"
},
"token": "8ow6BUFoSK6sGn4SqCu6ew|hqeUSUijRu4YNJXmlnWSSKkNtzfkvowg|99adfaa0-e8e7-4ebd-867c-f0666a960008",
"estimatedTimeToExpiration": "364:23:58"
}
}
JSON5. Create a second POST HTTP Request called TEST_VDS and add x-tableau-auth with the token as value

6. In the BODY, create a JSON file and click Send. You will get the Regions with the Sum of Sales:

Challenge
Your challenge is to use the Top N filter and Context filter to get the following data:

DataDev Rules!
Have you already solved it?
You can learn more from this exercise, like using Kyle Query Builder to explore more options.
If you want to know more about the DataDev Community, you can see the recorded session at SalesForce Plus
Solution
The following JSON code you will need to paste into the body of the POST call for Postman. Please note that the numbers may change due to updates in the Super Store Data Source.
A brief explanation about what is doing:
- The datasourceLuid is the ID used by your Super Store Data Source; please modify.
- You need four fields:
- Region: It is a dimension that slices the data and is used to sort as an alternative option.
- Sub-Category: It is a dimension that slices the data.
- Sales. It is a function SUM to aggregate the sales by Sub-Category and Region.
- Grand Total. It is a calculation using LOD FIXED Sub-Category and SUM(Sales), and it is used for sorting in descending order.
- Filter by:
- Sub-Category using TOP 10 over the SUM of Sales.
- Region (grey) applied by context with the values East and West
{
"datasource": {
"datasourceLuid": "ce88772e-45a7-4dd0-a422-f3b4c77cdf9a"
},
"options": {
"debug": true
},
"query": {
"fields": [
{
"fieldCaption": "Region",
"sortPriority": 2,
"sortDirection": "ASC"
},
{
"fieldCaption": "Sub-Category"
},
{
"fieldCaption": "Sales",
"function": "SUM",
"maxDecimalPlaces": 0
},
{
"fieldCaption": "Grand Total",
"calculation": "{FIXED [Sub-Category]: SUM([Sales])}",
"sortPriority": 1,
"sortDirection": "DESC",
"maxDecimalPlaces": 0
}
],
"filters": [
{
"field": {
"fieldCaption": "Sub-Category"
},
"filterType": "TOP",
"howMany": 10,
"fieldToMeasure": {
"fieldCaption": "Sales",
"function": "SUM"
},
"direction": "TOP"
},
{
"field": {
"fieldCaption": "Region"
},
"filterType": "SET",
"values": [
"East",
"West"
],
"exclude": false,
"context": true
}
]
}
}
}
JSONSpecial thanks to Le Luu, who raised the bar by adding the Grand Total and Sorting questions to the challenge. Initially, my challenge was about how to handle the filters with context and TOP 10 only.
Who am I?
Hey, I forgot to introduce myself. I am Cristian Saavedra Desmoineaux, a Visionary, Tableau Data Dev Ambassador, and co-founder of DataDevQuest. I am passionate about solving data problems and have over 20 years of experience in complex scenarios. You can contact me on LinkedIn.

DataDev Rules!
Special Thanks to Kyle Massey and Joe Chirilov
Do you have problems?
Are you getting a Resource Not Found message? VDS requires Hyperforce and Tableau Server Version: 2025.1.0
Sandbox and Developer Sites will be migrated after April 5th.