-
Notifications
You must be signed in to change notification settings - Fork 4
docs(connectors): add Looker Studio Data API + Columnar readmes #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f872209
docs(connectors): add Looker Studio Data API + Columnar readmes; mark…
teetangh aecc97e
docs(connectors): update Looker Studio readmes for Columnar and Data API
teetangh c7c55b4
docs(looker-studio): update Columnar readme to reflect Tabular Analyt…
teetangh 00ec27f
fix(test): update title length validation and add new tags
teetangh 8d7a819
docs(looker-studio): enhance Columnar readme for TAV usage and custom…
teetangh b81d674
docs(looker-studio): update short title in Columnar readme for clarity
teetangh 1c91d74
docs(looker-studio): enhance Data API readme with schema inference li…
teetangh 28a7189
docs(looker-studio): enhance Columnar readme with authentication and …
teetangh dd63e69
docs(looker-studio): update Columnar readme with new Couchbase link f…
teetangh 5a19864
fixed readme based on comments
teetangh e2c784b
updated based on feedback
teetangh 3caf8f6
added more urls
teetangh 6ae502b
added more urls here as well
teetangh 9291c4b
made query simple and removed flattening
teetangh 7258023
moved the section
teetangh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122 changes: 122 additions & 0 deletions
122
tutorial/markdown/connectors/looker-studio/columnar/readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- | ||
# frontmatter | ||
path: "/tutorial-looker-studio-columnar" | ||
# title and description do not need to be added to markdown, start with H2 (##) | ||
title: Looker Studio with Couchbase Columnar (Views-only with Tabular Analytics Views) | ||
short_title: Columnar (Views-only TAVs) | ||
description: | ||
- Connect Google Looker Studio to Couchbase Columnar using Tabular Analytics Views (TAVs) only | ||
- Create Tabular Analytics Views in Capella and use them as stable, optimized datasets | ||
- Learn authentication, configuration, schema inference, and troubleshooting | ||
content_type: tutorial | ||
filter: connectors | ||
technology: | ||
- server | ||
- query | ||
tags: | ||
- Looker Studio | ||
- Couchbase Columnar | ||
- Connector | ||
- Views-only | ||
sdk_language: | ||
- nodejs | ||
length: 20 Mins | ||
--- | ||
|
||
<!-- [abstract] --> | ||
|
||
## Overview | ||
|
||
This is a views-only connector for Google Looker Studio and Couchbase Columnar. It exclusively reads from Couchbase Tabular Analytics Views (TAVs) in Capella. Create one or more TAVs first, then connect Looker Studio to those views for analysis. | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
The connector authenticates with Basic Auth to the Columnar API (`/api/v1/request`) and infers schema automatically using `array_infer_schema` so Looker Studio fields are created with reasonable types. | ||
|
||
## Prerequisites | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
- A Couchbase Columnar deployment reachable from Looker Studio. | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- A database user with permissions to read from the target Tabular Analytics Views (TAVs) and execute queries. | ||
- Network access from Looker Studio to your Columnar host. | ||
|
||
## Authentication | ||
|
||
When adding the data source, provide: | ||
|
||
- Path: The Columnar host (optionally with port). Examples: | ||
- Capella-style host: `cb.<your-host>.cloud.couchbase.com` | ||
- Self-managed: `my.host:18095` (port recommended if not 443) | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- Username and Password: Database credentials. | ||
|
||
The connector validates credentials by running a lightweight test query (`SELECT 1 AS test;`). | ||
|
||
## Create Tabular Analytics Views (TAVs) in Capella (Required) | ||
|
||
Before connecting, create Tabular Analytics Views in Capella: | ||
|
||
1. Open your Capella cluster, go to the Analytics tab, and launch the Analytics Workbench. | ||
2. Prepare a SQL++ query that returns a flat, tabular result (flatten nested objects where needed). For example: | ||
|
||
```sql | ||
SELECT airportname AS airportname, | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
city AS city, | ||
country AS country | ||
FROM `travel-sample`.`inventory`.`airport` | ||
WHERE country = 'United States'; | ||
``` | ||
|
||
3. Run the query, then click Save as View → Annotate for Tabular View. Define the schema (column names, data types, and primary keys) and save with a descriptive name. | ||
|
||
- For details, see [Tabular Analytics Views](https://docs.couchbase.com/columnar/query/views-tavs.html) and [Buckets, Scopes, and Collections](https://docs.couchbase.com/cloud/clusters/data-service/about-buckets-scopes-collections.html). | ||
|
||
## Configuration | ||
teetangh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Choose your mode in the configuration screen: | ||
|
||
- Configuration Mode: `By View` (views-only connector). | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### Mode: By View (TAV) | ||
|
||
- Couchbase Database, Scope, View: Selected from dropdowns populated from metadata. | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- Maximum Rows: Optional limit for returned rows; leave blank for no limit. | ||
|
||
What runs: | ||
|
||
- Data: `SELECT <requested fields or *> FROM \`database\`.\`scope\`.\`view\` [LIMIT n]` | ||
- Schema: `SELECT array_infer_schema((SELECT VALUE t FROM \`database\`.\`scope\`.\`view\` [LIMIT n])) AS inferred_schema;` | ||
|
||
> Note: This connector does not query collections directly and does not accept custom queries. It reads through Tabular Analytics Views (TAVs) only. | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Schema and Field Types | ||
|
||
- The connector converts inferred types to Looker types: | ||
- number → NUMBER (metric) | ||
- boolean → BOOLEAN (dimension) | ||
- string/objects/arrays/null → STRING/TEXT (dimension) | ||
- Nested fields are flattened using dot and array index notation where possible (for example, `address.city`, `schedule[0].day`). Unstructured values may be stringified. | ||
teetangh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Data Retrieval | ||
|
||
- Only requested fields are projected. For nested fields, the connector fetches the required base fields and extracts values client-side. | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- Row limits: | ||
- View mode: `Maximum Rows` controls `LIMIT` (blank = no limit). | ||
|
||
## Tips and Best Practices | ||
|
||
- Prefer Tabular Analytics Views for BI tooling; they offer a stable, optimized interface. | ||
- Keep datasets scoped and use `LIMIT` while exploring. | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Troubleshooting | ||
|
||
- Authentication failure: Check host/port, credentials, and network reachability to Columnar. | ||
- Schema inference errors: Ensure your entity or query returns rows; consider adding `LIMIT` for faster sampling. | ||
- API error from Columnar: Review the response message surfaced in Looker Studio and verify entity names, permissions, and syntax. | ||
|
||
## Future Scope (Prototype) | ||
|
||
- Collections and custom query support are in prototype and not available in this views-only connector. As support expands, you’ll be able to query collections directly from Looker Studio in addition to TAVs. | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Next Steps | ||
|
||
- Build charts in Looker Studio using your TAV-backed fields. | ||
- Iterate on Views/queries to shape the dataset for analytics. | ||
|
||
teetangh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
112 changes: 112 additions & 0 deletions
112
tutorial/markdown/connectors/looker-studio/dataapi/readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
--- | ||
# frontmatter | ||
path: "/tutorial-looker-studio-dataapi" | ||
# title and description do not need to be added to markdown, start with H2 (##) | ||
title: Looker Studio with Couchbase Data API | ||
short_title: Data API Connector | ||
description: | ||
- Connect Google Looker Studio to Couchbase through the Data API | ||
- Configure auth, select collections or use custom SQL++ queries | ||
- Learn schema inference, limits, and troubleshooting tips | ||
content_type: tutorial | ||
filter: connectors | ||
technology: | ||
- server | ||
- query | ||
tags: | ||
- Looker Studio | ||
- Google Data Studio | ||
- Data API | ||
- Connector | ||
sdk_language: | ||
- nodejs | ||
length: 20 Mins | ||
--- | ||
|
||
<!-- [abstract] --> | ||
|
||
## Overview | ||
|
||
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. | ||
|
||
## Prerequisites | ||
|
||
- 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. | ||
|
||
## Authentication | ||
|
||
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) | ||
- 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. | ||
|
||
## Configuration | ||
|
||
After authentication, choose a configuration mode: | ||
|
||
- Configuration Mode: `Query by Collection` or `Use Custom Query`. | ||
|
||
### Mode: Query by Collection | ||
|
||
- Couchbase Collection: Pick a `bucket > scope > collection` from 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 <maxRows>` | ||
- Schema: `INFER \`bucket\`.\`scope\`.\`collection\` WITH {"sample_size": 100, "num_sample_values": 3, "similarity_metric": 0.6}` | ||
|
||
### Mode: Use Custom Query | ||
|
||
- Custom SQL++ Query: Paste any valid SQL++ statement. Include a `LIMIT` for performance. | ||
|
||
What runs: | ||
|
||
- Schema inference first attempts to run `INFER` on your query (a `LIMIT 100` is 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 1` and infers the schema from one sample document. | ||
|
||
## Schema and Field Types | ||
|
||
- 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. | ||
|
||
## Data Retrieval | ||
|
||
- Only the fields requested by Looker Studio are returned. Nested values are extracted using dot paths where possible. | ||
- Row limits: | ||
- Collection mode: `Maximum Rows` controls the `LIMIT` (default 100). | ||
- Custom query mode: You control `LIMIT` inside your query. | ||
|
||
## Tips and Best Practices | ||
|
||
- Prefer `Query by Collection` for quick starts and simpler schemas. | ||
- Always add a `LIMIT` when exploring with custom queries. | ||
- Ensure your user has at least query and read access on the target collections. | ||
teetangh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Troubleshooting | ||
|
||
- 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 `LIMIT` to improve sampling. | ||
- Query errors from the service: Review the error text surfaced in Looker Studio; fix syntax, permissions, or keyspace names. | ||
|
||
## Next Steps | ||
|
||
- Create charts and tables in Looker Studio from the exposed fields. | ||
- Iterate on custom SQL++ queries to shape the dataset for your dashboards. | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.