Visualize Live Spotify Data in Tableau

Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
Use CData Tableau Connectors and Tableau Desktop to visualize live Spotify data.

Tableau is a visual analytics platform transforming the way businesses use data to solve problems. When paired with the CData API Driver for Tableau, you can easily get access to live Spotify data within Tableau. This article shows how to connect to Spotify in Tableau and build a simple chart.

The CData Tableau Connectors enable high-speed access to live Spotify data in Tableau. Once you install the connector, you simply authenticate with Spotify and you can immediately start building responsive, dynamic visualizations and dashboards. By surfacing Spotify data using native Tableau data types and handling complex filters, aggregations, & other operations automatically, CData Tableau Connectors grant seamless access to Spotify data.

NOTE: The CData Tableau Connectors require Tableau 2020.3 or higher. If you are using an older version of Tableau, you will need to use the CData JDBC Driver.

Connect to Spotify in Tableau

Open Tableau and click More under Connect -> To a Server. Select "Spotify by CData," then configure the connection and click "Sign In."

Using OAuth Authentication

Spotify uses OAuth 2.0 for authentication. You will need to create an application in the Spotify Developer Dashboard to obtain your client credentials.

Setting Up Your Spotify Application

  1. Visit the Spotify Developer Dashboard.
  2. Log in with your Spotify account and click Create app.
  3. Provide an app name, description, and set a Redirect URI (e.g.,
    http://localhost:33333
    for desktop applications).
  4. Copy your Client ID and Client Secret from the app settings.

Connection Properties

After setting the following connection properties, you are ready to connect:

  • AuthScheme: Set this to OAuth.
  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to manage the process to obtain the OAuthAccessToken.
  • OAuthClientId: Set this to your Spotify application's Client ID.
  • OAuthClientSecret: Set this to your Spotify application's Client Secret.
  • Scope: Set this to the required OAuth scopes (space-separated). The default includes all read scopes needed for the tables in this profile.
  • CallbackURL: Set this to the Redirect URI configured in your Spotify application (e.g., http://localhost:33333).

Example Connection String

Profile=C:\profiles\Spotify.apip;AuthScheme=OAuth;InitiateOAuth=GETANDREFRESH;OAuthClientId=your_client_id;OAuthClientSecret=your_client_secret;CallbackURL=http://localhost:33333;

Available OAuth Scopes

  • user-read-private: Read access to user's subscription details and explicit content settings.
  • user-read-email: Read access to user's email address.
  • user-library-read: Read access to a user's saved tracks, albums, episodes, shows, and audiobooks.
  • playlist-read-private: Read access to user's private playlists.
  • playlist-read-collaborative: Read access to collaborative playlists the user follows.
  • user-follow-read: Read access to the list of artists the current user follows.
  • user-read-playback-state: Read access to a user's player state (device, current track, progress).
  • user-read-currently-playing: Read access to a user's currently playing content.
  • user-read-playback-history: Read access to a user's recently played tracks.
  • user-top-read: Read access to a user's top artists and tracks.

Discover Schemas and Query Data

  1. Select CData from the Database pull-down menu.
  2. Select API from the Schema pull-down menu.
  3. Drag the tables and views you wish to visualize onto the join area. You can include multiple tables.
  4. Select Update Now or Automatically Update. Update Now lets you preview the first 10,000 rows of the data source (or enter the number of rows you want to see in the Rows text box). Automatically Update automatically reflects the changes in the preview area.
  5. Click the tab for your worksheet. Columns are listed as Dimensions and Measures, depending on the data type. The CData Tableau Connector discovers data types automatically, allowing you to leverage the powerful data processing and visualization features of Tableau.
  6. Drag a field from the Dimensions or Measures area to Rows or Columns. Tableau creates column or row headers.
  7. Select one of the chart types from the Show Me tab. Tableau displays the chart type that you selected.

Using the CData API Driver for Tableau with Tableau, you can easily create robust visualizations and reports on Spotify data. Download a free, 30-day trial and get started today.

Ready to get started?

Connect to live data from Spotify with the API Driver

Connect to Spotify