Table Extensions Intermediate

#DDQ2025-06 Tableau Table Extensions – Dynamic Job Search with Parameters and DuckDB (Intermediate)

Leverage dynamic parameters, DuckDB, and Table Extensions in Tableau to search jobs using custom keywords and locations directly from your dashboard!

P

Paula Munoz

Author

2025-06-29T18:00:34
5 min read
preview.png

Welcome to the DataDev Quest Intermediate Challenge for June 2025!

In this challenge, we’re building upon the foundational skills from the beginner challenge and taking it one step further.

In this intermediate challenge, you will leverage dynamic parameters, DuckDB, and Table Extensions in Tableau to allow users to search jobs using custom keywords and locations—directly from a dashboard!

Challenge Overview

Objective:

To create a dynamic job board using Tableau Table Extensions that allows users to input both a search keyword and a location, fetch relevant jobs using the Jooble Job API, and display enriched job information in the dashboard.

By the end of this challenge, you will learn:

  • How to dynamically pass a parameter (e.g., a keyword like “Data Analyst”) to a Python script
  • How to fetch API results based on a user’s input
  • How to update job listings on the fly using Tableau Table Extensions
  • How to leverage DuckDB as a lightweight data source for parameter input

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

Prerequisites

  • Complete #DDQ2025-06 Beginner challenge, to ensure you can successfully retrieve data using the Jooble API.
  • TabPy installed and running (run pip install tabpy and then tabpy)
  • DuckDB installed in the same Python environment (pip install duckdb) <- Review How to connect to a DuckDB database in Tableau

Why We Use DuckDB

To enable dynamic parameters in Tableau Table Extensions, we need to provide Tableau with a live data source that supports Custom SQL queries. These queries act as a bridge to pass parameter values to Python.

For this challenge, we use DuckDB, a fast and lightweight SQL-based database that can be embedded easily. It allows us to store a simple table with our input parameters and lets Tableau pass those parameters to the Python script through Custom SQL.

DuckDB is ideal for lightweight, local prototyping scenarios like this one.

1. Setup a DuckDB Database with Parameters

  • First, create a simple Python script to initialize the DuckDB database with sample keyword and location values.
  • Create a file named duckdb_input.py and include the following:
CODE
import duckdb
con = duckdb.connect("keywords.duckdb")

# Create a table with a placeholder value (can be updated later)
con.execute("""
    CREATE OR REPLACE TABLE parameters AS 
    SELECT 'Tableau' AS keyword, 'Boston' AS location;
""")
con.close()
  • Run this script once in your terminal: python duckdb_input.py
  • It will create the keywords.duckdb file and populate it with a parameters table.

2. Connect Tableau to DuckDB

3. Create Tableau Parameters

  • Let’s create the two parameters before adding the Table Extension and Custom SQL objects to the canvas.
    • In Tableau Desktop (After connecting to your DuckDB file):
      • Navigate to sheet 1
      • Create a parameter named keyword
        • Data Type: String
        • Current Value: Tableau
      • Create a parameter named location
        • Data Type: String
        • Current Value: Boston

4. Add Table Extension and Custom SQL using Parameters

  • In the Data Source tab in Tableau Desktop:
    1. Drag New Table Extension object to the canvas
    2. Drag New Custom SQL object
    3. Use the following Custom SQL:
CODE
SELECT 
      <Parameters.keyword> AS keyword, 
      <Parameters.location> AS location 
FROM parameters


Your Challenge: Update the Python Script to call Jooble API with Dynamic Parameters

The purpose of this challenge is to allow users to input a keyword and/or location when using the Tableau Dashboard to fetch fresh data from the Jooble API using Tableau parameters.

Part 1: Update the Python Script from the beginner challenge to call Jooble API with the dynamic ‘keyword’ and ‘location’ parameters

  • As a reminder below are the requirements for the beginner challenge, just make in this intermediate challenge to incorporate the dynamic keyword and location parameters to dynamically fetch data from the Jooble API.

  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.

Hint:

  • Assign the keyword and location fields as input to _arg1, and convert it to a pandas dataframe.

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.
  • Add keyword and location parameters to the dashboard to allow for testing and interactivity
  • 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