Skip to content

Commit 8d7a819

Browse files
committed
docs(looker-studio): enhance Columnar readme for TAV usage and custom query support
- Updated title and overview to clarify the connection process between Looker Studio and Couchbase Columnar using Tabular Analytics Views (TAVs). - Expanded instructions for creating TAVs and added a new section for custom SQL++ queries, including requirements and examples. - Improved clarity in troubleshooting tips and best practices for using TAVs with Looker Studio. Files: - tutorial/markdown/connectors/looker-studio/columnar/readme.md
1 parent 00ec27f commit 8d7a819

File tree

1 file changed

+53
-18
lines changed
  • tutorial/markdown/connectors/looker-studio/columnar

1 file changed

+53
-18
lines changed

tutorial/markdown/connectors/looker-studio/columnar/readme.md

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# frontmatter
33
path: "/tutorial-looker-studio-columnar"
44
# title and description do not need to be added to markdown, start with H2 (##)
5-
title: Looker Studio with Couchbase Columnar (Views-only with Tabular Analytics Views)
5+
title: Connect Looker Studio to Couchbase Columnar using Tabular Analytics Views
66
short_title: Columnar (Views-only TAVs)
77
description:
88
- Connect Google Looker Studio to Couchbase Columnar using Tabular Analytics Views (TAVs) only
@@ -27,23 +27,24 @@ length: 20 Mins
2727

2828
## Overview
2929

30-
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.
30+
Connect Looker Studio to Couchbase Columnar for data analysis and visualization. This connector exclusively uses Tabular Analytics Views (TAVs) as stable, optimized data sources.
31+
32+
**Workflow**: First, create TAVs in Couchbase Capella from your Columnar data. Then connect Looker Studio to those views for powerful business intelligence and reporting. TAVs provide a stable, schema-defined interface that's optimized for BI tools like Looker Studio.
3133

3234
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.
3335

3436
## Prerequisites
3537

36-
- A Couchbase Columnar deployment reachable from Looker Studio.
38+
- A Couchbase Columnar deployment reachable from Looker Studio. For setup information, see [Getting Started with Couchbase Columnar](https://docs.couchbase.com/columnar/current/get-started/index.html).
3739
- A database user with permissions to read from the target Tabular Analytics Views (TAVs) and execute queries.
3840
- Network access from Looker Studio to your Columnar host.
3941

4042
## Authentication
4143

4244
When adding the data source, provide:
4345

44-
- Path: The Columnar host (optionally with port). Examples:
45-
- Capella-style host: `cb.<your-host>.cloud.couchbase.com`
46-
- Self-managed: `my.host:18095` (port recommended if not 443)
46+
- Path: The Columnar host. Example:
47+
- Capella host: `cb.<your-host>.cloud.couchbase.com`
4748
- Username and Password: Database credentials.
4849

4950
The connector validates credentials by running a lightweight test query (`SELECT 1 AS test;`).
@@ -53,7 +54,7 @@ The connector validates credentials by running a lightweight test query (`SELECT
5354
Before connecting, create Tabular Analytics Views in Capella:
5455

5556
1. Open your Capella cluster, go to the Analytics tab, and launch the Analytics Workbench.
56-
2. Prepare a SQL++ query that returns a flat, tabular result (flatten nested objects where needed). For example:
57+
2. Prepare a SQL++ query that returns a tabular result. For simple, flat data structures, basic SELECT statements work well. For nested objects, consider flattening them for better BI tool compatibility. For example:
5758

5859
```sql
5960
SELECT airportname AS airportname,
@@ -83,7 +84,39 @@ What runs:
8384
- Data: `SELECT <requested fields or *> FROM \`database\`.\`scope\`.\`view\` [LIMIT n]`
8485
- Schema: `SELECT array_infer_schema((SELECT VALUE t FROM \`database\`.\`scope\`.\`view\` [LIMIT n])) AS inferred_schema;`
8586

86-
> Note: This connector does not query collections directly and does not accept custom queries. It reads through Tabular Analytics Views (TAVs) only.
87+
### Mode: By Custom Query
88+
89+
- Custom Columnar Query: Enter your own SQL++ query directly in a text area.
90+
- Maximum Rows: Not applicable (control limits within your query using `LIMIT`).
91+
92+
**Use this mode when**:
93+
- You need more complex queries than simple TAV selection
94+
- You want to join multiple TAVs or apply advanced filtering
95+
- You need aggregations or transformations not available in your existing TAVs
96+
97+
**Query requirements**:
98+
- Must be valid SQL++ syntax for Couchbase Columnar
99+
- Include `LIMIT` clause for performance (recommended during testing)
100+
- Use proper escaping for database, scope, and view names with backticks
101+
102+
**Example custom query**:
103+
```sql
104+
SELECT airline.name AS airline_name,
105+
airline.iata AS iata_code,
106+
airline.country AS country,
107+
COUNT(*) AS route_count
108+
FROM `travel-sample`.`inventory`.`airline` AS airline
109+
JOIN `travel-sample`.`inventory`.`route` AS route
110+
ON airline.iata = route.airline
111+
WHERE airline.country = "United States"
112+
GROUP BY airline.name, airline.iata, airline.country
113+
LIMIT 100;
114+
```
115+
116+
What runs:
117+
- Data: Your exact custom query as entered
118+
- Schema: `SELECT array_infer_schema((your_custom_query)) AS inferred_schema;`
119+
87120

88121
## Schema and Field Types
89122

@@ -93,30 +126,32 @@ What runs:
93126
- string/objects/arrays/null → STRING/TEXT (dimension)
94127
- Nested fields are flattened using dot and array index notation where possible (for example, `address.city`, `schedule[0].day`). Unstructured values may be stringified.
95128

129+
> **⚠️ Schema Inference Notes**: Field types are inferred from sampled data and may miss variations (e.g., fields containing both text and numbers). Some fields present in unsampled documents may not be detected. If schema inference fails, ensure your TAV contains data and try adding a `LIMIT` clause to sample fewer rows.
130+
96131
## Data Retrieval
97132

98-
- Only requested fields are projected. For nested fields, the connector fetches the required base fields and extracts values client-side.
133+
- Only requested fields are projected. For nested fields, the connector fetches the required base fields and extracts values server-side within the Apps Script environment.
99134
- Row limits:
100135
- View mode: `Maximum Rows` controls `LIMIT` (blank = no limit).
101136

102137
## Tips and Best Practices
103138

104-
- Prefer Tabular Analytics Views for BI tooling; they offer a stable, optimized interface.
105-
- Keep datasets scoped and use `LIMIT` while exploring.
139+
- **Prefer Tabular Analytics Views for BI tooling**: TAVs provide a stable, optimized interface with predefined schemas, making them ideal for consistent reporting and visualization. They also offer better performance than ad-hoc queries.
140+
- **Use `LIMIT` while exploring**: Start with smaller datasets (e.g., `LIMIT 1000`) to test connectivity and schema inference quickly. Remove or increase limits once you're satisfied with the data structure.
106141

107142
## Troubleshooting
108143

109-
- Authentication failure: Check host/port, credentials, and network reachability to Columnar.
110-
- Schema inference errors: Ensure your entity or query returns rows; consider adding `LIMIT` for faster sampling.
111-
- API error from Columnar: Review the response message surfaced in Looker Studio and verify entity names, permissions, and syntax.
112-
113-
## Future Scope (Prototype)
114-
115-
- 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.
144+
- **Authentication failure**: Check host, credentials, and network reachability to Columnar.
145+
- **Schema inference errors**: Ensure your TAV exists and contains data. Try adding a `LIMIT` clause for faster sampling (e.g., `LIMIT 100`).
146+
- **API error from Columnar**: Review the response message in Looker Studio and verify TAV names, permissions, and that the view is properly created in Capella.
147+
- **Empty or missing TAV**: Verify that your Tabular Analytics View was saved correctly in the Analytics Workbench and contains data.
148+
- **Mixed data types**: If fields appear as STRING when they should be NUMBER, your data may have mixed types. Consider data cleanup in your TAV query.
116149

117150
## Next Steps
118151

119152
- Build charts in Looker Studio using your TAV-backed fields.
120153
- Iterate on Views/queries to shape the dataset for analytics.
121154

155+
> **Note**: Screenshots and step-by-step visual guides for creating charts and configuring the connector will be added to this section.
156+
122157

0 commit comments

Comments
 (0)