| path | /tutorial-looker-studio-dataapi | ||||
|---|---|---|---|---|---|
| title | Looker Studio with Couchbase Data API | ||||
| short_title | Data API Connector | ||||
| description |
|
||||
| content_type | tutorial | ||||
| filter | connectors | ||||
| technology |
|
||||
| tags |
|
||||
| sdk_language |
|
||||
| length | 20 Mins |
Use this connector to build Looker Studio reports directly on Couchbase via the Data API. You can:
- Query by selecting a specific
bucket.scope.collection. - Or run a custom SQL++ query.
Behind the scenes, the connector authenticates with Basic Auth and talks to the Data API endpoints for caller identity checks and to the Query Service for SQL++ execution. Schema is inferred automatically from sampled data to make fields available in Looker Studio.
- A Couchbase Capella cluster or a self-managed cluster with the Query Service reachable from Looker Studio.
- A database user with permissions to read the target collections and run queries.
- Network access from Looker Studio to your cluster host.
When you add the data source in Looker Studio, you will be prompted for:
- Path: The cluster host (optionally with port). Examples:
- Capella:
cb.<your-host>.cloud.couchbase.com - Self-managed:
my.host:18095(specify a non-443 port explicitly)
- Capella:
- Username and Password: Database credentials.
The connector validates credentials against the Data API (/v1/callerIdentity). If validation fails, verify host, port, credentials, and network access.
After authentication, choose a configuration mode:
- Configuration Mode:
Query by CollectionorUse Custom Query.
- Couchbase Collection: Pick a
bucket > scope > collectionfrom the dropdown. The connector discovers collections for you. - Maximum Rows: Optional limit for returned rows (default 100).
What runs:
- Data:
SELECT RAW collection FROM \bucket`.`scope`.`collection` LIMIT ` - Schema:
INFER \bucket`.`scope`.`collection` WITH {"sample_size": 100, "num_sample_values": 3, "similarity_metric": 0.6}`
- Custom SQL++ Query: Paste any valid SQL++ statement. Include a
LIMITfor performance.
What runs:
- Schema inference first attempts to run
INFERon your query (aLIMIT 100is added if absent):INFER (<yourQuery>) WITH {"sample_size": 10000, "num_sample_values": 2, "similarity_metric": 0.1} - If that fails, it runs your query with
LIMIT 1and infers the schema from one sample document.
- Fields are inferred from sampled data. Types map to Looker Studio as:
- NUMBER → metric
- BOOLEAN → dimension
- STRING (default for text, objects, arrays) → dimension
- Nested fields use dot notation (for example,
address.city). Arrays and objects not expanded become stringified values. - If the collection has no documents or your query returns no rows, schema inference will fail.
- Only the fields requested by Looker Studio are returned. Nested values are extracted using dot paths where possible.
- Row limits:
- Collection mode:
Maximum Rowscontrols theLIMIT(default 100). - Custom query mode: You control
LIMITinside your query.
- Collection mode:
- Prefer
Query by Collectionfor quick starts and simpler schemas. - Always add a
LIMITwhen exploring with custom queries. - Ensure your user has at least query and read access on the target collections.
- Authentication error: Check host/port, credentials, and that the Data API is reachable from Looker Studio.
- Empty schema or no fields: Ensure the collection has data; for custom queries, verify the statement and add
LIMITto improve sampling. - Query errors from the service: Review the error text surfaced in Looker Studio; fix syntax, permissions, or keyspace names.
- Create charts and tables in Looker Studio from the exposed fields.
- Iterate on custom SQL++ queries to shape the dataset for your dashboards.