Skip to main content

Data Studio with MotherDuck

Data Studio, formerly Looker Studio, is Google's free reporting and dashboarding tool. It connects to MotherDuck through Google's built-in PostgreSQL connector using MotherDuck's Postgres endpoint.

Data Studio (formerly Looker Studio) connects to MotherDuck through the Postgres endpoint using Google's built-in PostgreSQL connector. This is a different product from Looker, which uses a different connector and its own setup.

Before you start​

You'll need:

Connect to MotherDuck​

  1. Go to Data Studio and select the PostgreSQL connector.

    Data Studio connector gallery with the Google PostgreSQL connector selected
  2. On the BASIC tab, fill in the connection details, check Enable SSL, and upload the ISRG Root X1 certificate as the Server certificate. Leave Enable client authentication unchecked.

    Data Studio PostgreSQL connection form with host, port, database, username, password, SSL enabled, and a server certificate uploaded
  3. Click Authenticate, then select a table or write a custom query. See Query your data below.

  4. Click Connect. Data Studio lists the fields in your data source.

    Data Studio data source view listing the dimensions and metrics from a MotherDuck table
  5. Click Create Report to build charts from your MotherDuck data.

    Data Studio report with a pie chart, bar chart, time series, and scorecard built from MotherDuck data

Connection parameters​

ParameterValue
Host Name or IPpg.<region>-aws.motherduck.com (find yours at Postgres settings or with md_user_info())
Port5432 (find yours at Postgres settings)
DatabaseYour database name
Usernamepostgres
PasswordYour MotherDuck access token
Enable SSLChecked, with ISRG Root X1 as the server certificate
Enable client authenticationUnchecked

Query your data​

Data Studio's TABLES list is populated from a schema named public. MotherDuck creates tables in the main schema, so the list is empty unless a public schema exists in your database. Choose one of the two approaches below.

Use a custom query​

Select CUSTOM QUERY and write a query using the fully qualified table name:

SELECT * FROM my_db.main.events

Each data source is backed by one query. Use this when you want to shape the data in SQL, or to join across schemas and databases.

Browse tables from the table list​

To use the TABLES list instead, create a view in a public schema for each table you want to browse:

CREATE SCHEMA IF NOT EXISTS public;
CREATE VIEW public.events AS SELECT * FROM main.events;

Give the view the same name as the table it selects from. Data Studio reads the field list from public.events, but the queries it generates for charts are unqualified, so they resolve against main. If the names differ, charts fail with Catalog Error: Table with name <name> does not exist.

Troubleshooting​

SymptomResolution
There are no tables available in this databaseExpected when your database has no public schema. Use a custom query, or create views in a public schema.
Charts fail with Catalog Error: Table with name <name> does not existThe view in public has a different name from the table in main. Recreate it with matching names.
Connecting takes a long time, or the table list does not loadCheck Enable SSL and upload the ISRG Root X1 certificate. The Postgres endpoint only accepts encrypted connections.
The field list is stale after changing a tableClick REFRESH FIELDS on the data source, or create a new data source.

Additional information​