Table Extensions Beginner

#DDQ2025-06 Tableau Table Extensions – Job Search API (Beginner)

Hello!, today you will learn how to use Tableau Table Extensions to create dynamic data tables powered by a custom Python (TabPy) analytics extension script.

P

Paula Munoz

Author

2025-06-29T17:59:27
7 min read
preview.png

Welcome to the DataDev Quest Beginner Challenge for June 2025!

This challenge is designed to teach you how to use Tableau Table Extensions to create dynamic data tables powered by a custom Python (TabPy) analytics extension script.

If you’ve never used Table Extensions before, this is a great starting point to get hands-on experience with the basics of scripting and connecting external data sources directly into Tableau using Python.

Challenge Overview

Scenario:

Imagine you’re part of the Data team at a workforce development agency or a consulting firm working with a staffing company.

Your manager has identified the Jooble Job API as a potential data source for tracking national job demand.

You’re being asked to:

  • Test the API by pulling a sample of live job postings
  • Evaluate its structure and reliability
  • Build an initial prototype dashboard in Tableau to demonstrate value
  • Present this as a proof of concept before committing to a more robust integration strategy

To do this, you’ll:

  • Connect Tableau Desktop to Python using Table Extensions
  • Use Python to fetch live job data via the API
  • Clean and enrich the data within Python Script (e.g., split City and State from the job location)
  • Return the data to Tableau to build simple visualizations

Objective:

The goal of this lab is to introduce you to Table Extensions in Tableau by building a simple, real-world integration with Python.

By the end of this lab, you will:

  • Connect Tableau to Python using TabPy
  • Fetch live job postings from the Jooble Job Search API
  • Use Python to split the job location into separate City and State fields
  • Display the enriched data in Tableau using a Table Extension
  • Gain hands-on experience building a prototype dashboard with real API data

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


Getting Started

1. Get your Jooble API Key

  • Visit Jooble API Signup
  • Fill out the form with:
    • A valid email address (this is where you’ll receive your API key)
    • For other fields like website or phone number, you can enter dummy but realistic values
  • Submit the form. API access is typically granted immediately
  • Check your inbox for an email from Jooble containing your personal API key (Keep your API key safe, you will use it in your custom Python analytics script

2. Test your Python environment & API setup

  • Before working in Tableau, let’s verify that:
    • Your Python environment is working
    • You can successfully connect to the Jooble API
    • You understand the structure of the data you’ll be working with

This is a sample script to test your environment setup (using as a baseline the sample provided in Jooble website, and of course since we are all Tableau fans, let’s use “tableau” as the keyword to get some sample job postings)

CODE
import http.client
import json
import pandas as pd
host = 'jooble.org'
key = 'YOUR JOOBLE API KEY'  # Replace with your Jooble API key
# Create the connection
connection = http.client.HTTPConnection(host)
# Set headers
headers = {"Content-type": "application/json"}
# Create request body
body = '{ "keywords": "tableau", "location": ""}'
# Send request
connection.request('POST','/api/' + key, body, headers)
# Get response
response = connection.getresponse()
print("Status:", response.status, response.reason)
# Read and decode response
data = response.read().decode('utf-8')
data_json = json.loads(data)
# Parse jobs
jobs = data_json.get("jobs", [])
# Convert to DataFrame
df = pd.DataFrame(jobs)
# Understanding the  DataFrame
pd.set_option('display.max_columns', None)
df.info()
print(df.head()) # Preview the first few rows

df.info() output:

Sample preview of the first few rows:

3. Set Up TabPy

  • To use Python in Tableau, you need to install TabPy. If you haven’t installed it yet, run this in your terminal to install TabPy server on your machine:

pip install tabpy

  • Once the installation is successful, you can run TabPy. In your terminal run:

tabpy

You should see something like: Web service listening on port 9004

That means TabPy is running locally at: http://localhost:9004/Keep this terminal window open while using Tableau.

4. Connect Tableau to TabPy in Tableau Desktop

  • In Tableau Desktop: Go to Help > Settings and Performance > Manage Analytics Extension Connection

  • In the pop-up window, set up the Server and Port. Select:
    • Service: TabPy/External API
    • Hostname: localhost
    • Port: 9004

  • Click Test Connection
    You should see: Successfully connected to the analytics extension.
  • Click OK

You’re now ready to run any Table Extension locally using Python!

5. Insert a Table Extension

  • Before we can use table extensions, we need to add / open a data source in Tableau Desktop. It could be a simple .csv file (here you can see how I used a dummy.csv file as an initial data source)
  • The structure of this sample .csv file is very simple:

  • Now you can remove the sample .csv file, and drag the New Table Extension object:

  • And now you are ready to enter your Python Script under “Current Analytics Connection” section:

A Quick Note About Table Extensions

Before we work on the script, it’s important to understand how data flows in a Tableau Table Extension:

Tableau does not send or receive data as traditional tables or data frames. Instead, it sends the data in a dictionary structure, where each key represents a column name and each value is a list of column values.

That means:

  • To work with it like a typical table, we need to convert it into a DataFrame using pd.DataFrame().
  • After processing the data (cleaning, transforming, etc.), we must convert it back to a dictionary using .to_dict(orient="list") so Tableau can display the results.

This conversion step is essential in every Table Extension script.

6. Test your Jooble API Script inside Tableau

  • Before jumping into the challenge, let’s test the base Python script previously used in your Python environment, but now in Tableau using a Table extension to ensure Tableau is able to connect to the Jooble API and retrieve data successfully.
  • Make sure to modify the python script to return the output as a dictionary.


Your Challenge: Extend the Starter Script and Build a Dashboard

This lab is your chance to practice working with a real API, clean and enrich the data, and build something insightful in Tableau.

Part 1: Update and Extend the Python Script

  1. Fix ‘id’ and ‘salary’ Issues in Tableau
    • You may notice that the fields ‘id‘ and ‘salary‘ appear as null in Tableau.
    • From my observation, salary is rarely available and can be ignored.
    • However, id is helpful to uniquely identify job records — update the script to ensure that ‘id’ values are being imported
  2. Import at Least 120 Job Records
    • The starter script currently fetches only 1 page (~30 jobs).
    • Modify the script to loop through multiple pages (e.g., 4 pages) so that at least 120 job records are imported.
  3. Update Python Script to extract City and State from the Location Field
    • Use the location field (e.g., “Seattle, WA”) to create two new fields:
      • city → “Seattle”
      • state → “WA”
    • Ensure these new fields are added to the final data output sent to Tableau.

Part 2: Create a Tableau Dashboard

Get creative to make your dashboard insightful and visually appealing!

  • Build a dashboard in Tableau using the enriched dataset.
  • Include at least one view that shows:
    • Job count by City and State


Solution:

Our suggested solution will be posted here at the end of July 2025


Who am I?

Hi, and welcome! I’m Paula Muñoz, a proud Tableau DataDev Ambassador and one of the founding members of DataDevQuest (DDQ). I’m thrilled to have you here! 😊
My passion lies in Tableau, data visualization, and helping others grow in the data community. You can contact me on LinkedIn