Query Census Store locally using DuckDB
Query Census Store locally using DuckDB Apache Iceberg integration for Zero-ETL access to SaaS and CSV datasets.
Last updated
Was this helpful?
Query Census Store locally using DuckDB Apache Iceberg integration for Zero-ETL access to SaaS and CSV datasets.
Last updated
Was this helpful?
To query Census Store from DuckDB, you will need:
DuckDB version ≥ 1.3.0
A Census workspace with one or more SaaS or CSV datasets materialized in Census Store
In Census, create OAuth2 client credentials that Snowflake will use to access your workspace's Iceberg catalog:
Open Census and navigate to Workspace settings.
Select the Census Store tab.
Under Iceberg Catalog, click Create Client Credentials.
Copy the newly-created client ID and secret. The secret is only visible when you first create a set of client credentials. If you lose the secret, you will need to create a new set of client credentials.
Open DuckDB.
Install Iceberg Extension and load it
In DuckDB attach catalog integration to the Iceberg catalog for your workspace’s Managed Storage:
Choose a unique name for your catalog integration and substitute it for <catalog integration name>
Substitute your Census workspace’s Iceberg catalog endpoint for <catalog endpoint>
. You can find your workspace’s Iceberg catalog endpoint on the Census Store tab of Workspace settings under Iceberg Catalog.
Substitute your Census workspace’s Iceberg catalog name for <catalog name>
. You can find your workspace’s Iceberg catalog endpoint on the Census Store tab of Workspace settings under Iceberg Catalog.
Substitute the client ID and secret for the Iceberg catalog credentials you created in the previous step for <client id>
and <client secret>
.
Run the following SQL statement.
Run the following SQL statement to verify connectivity and get a list of tables:
Substitute the name of the catalog integration you created in the previous step for <catalog integration name>
.
Substitute the namespace and table name your Census Store dataset is materialized in for <dataset namespace>
and <dataset table name>
respectively. You can find these names on the dataset details page for your dataset in Census.