Skip to content

Commit 5a19864

Browse files
committed
fixed readme based on comments
1 parent dd63e69 commit 5a19864

File tree

2 files changed

+21
-26
lines changed

2 files changed

+21
-26
lines changed

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

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
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: Connect Looker Studio to Couchbase Columnar using Tabular Analytics Views
5+
title: Connect Looker Studio to Couchbase Columnar using Views and Custom Queries
66
short_title: Columnar Looker Studio Connector
77
description:
8-
- Connect Google Looker Studio to Couchbase Columnar using Tabular Analytics Views (TAVs)
9-
- Create Tabular Analytics Views in Capella and use them as stable, optimized datasets
8+
- Connect Google Looker Studio to Couchbase Columnar using Tabular Analytics Views (TAVs) or custom queries
9+
- Create Tabular Analytics Views in Capella for stable datasets or use custom SQL++ queries for flexibility
1010
- Learn authentication, configuration, schema inference, and troubleshooting
1111
content_type: tutorial
1212
filter: connectors
@@ -27,9 +27,9 @@ length: 20 Mins
2727

2828
## Overview
2929

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.
30+
Connect Looker Studio to Couchbase Columnar for data analysis and visualization. This connector supports two modes: Tabular Analytics Views (TAVs) for stable, optimized data sources, and custom queries for flexible data exploration.
3131

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.
32+
**Workflow**: Either create TAVs in Couchbase Capella for consistent reporting, or use custom SQL++ queries for ad-hoc analysis. TAVs provide a stable, schema-defined interface that's optimized for BI tools, while custom queries offer maximum flexibility for complex data operations.
3333

3434
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.
3535

@@ -53,19 +53,24 @@ When you add the Couchbase Columnar connector in Looker Studio, you'll see the a
5353

5454
![Authentication Screen](step-0.png "Couchbase Columnar connector authentication screen in Looker Studio")
5555

56-
## Create Tabular Analytics Views (TAVs) in Capella (Required)
56+
## Create Tabular Analytics Views (TAVs) in Capella (Recommended)
5757

58-
Before connecting, create Tabular Analytics Views in Capella:
58+
For the "By View" mode, create Tabular Analytics Views in Capella:
5959

6060
1. Open your Capella cluster, go to the Analytics tab, and launch the Analytics Workbench.
6161
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:
6262

6363
```sql
64-
SELECT airportname AS airportname,
65-
city AS city,
66-
country AS country
67-
FROM `travel-sample`.`inventory`.`airport`
68-
WHERE country = 'United States';
64+
-- Example with flattening for nested data structures
65+
SELECT a.airportname AS airport_name,
66+
a.city AS city,
67+
a.country AS country,
68+
a.geo.lat AS latitude,
69+
a.geo.lon AS longitude,
70+
ARRAY_FLATTEN(a.faa, ', ') AS faa_codes
71+
FROM `travel-sample`.`inventory`.`airport` AS a
72+
WHERE a.country = 'United States'
73+
LIMIT 100;
6974
```
7075

7176
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.
@@ -76,11 +81,11 @@ WHERE country = 'United States';
7681

7782
Choose your mode in the configuration screen:
7883

79-
- Configuration Mode: `By View` (views-only connector).
84+
- Configuration Mode: Choose between `By View` or `Use Custom Query`.
8085

8186
### Mode: By View (TAV)
8287

83-
- Couchbase Database, Scope, View: Selected from dropdowns populated from metadata.
88+
- Couchbase Database, Scope, View: Selected from dropdowns that automatically discover your available databases, scopes, and views from your Columnar instance.
8489
- Maximum Rows: Optional limit for returned rows; leave blank for no limit.
8590

8691
What runs:
@@ -93,16 +98,6 @@ What runs:
9398
- Custom Columnar Query: Enter your own SQL++ query directly in a text area.
9499
- Maximum Rows: Not applicable (control limits within your query using `LIMIT`).
95100

96-
**Use this mode when**:
97-
- You need more complex queries than simple TAV selection
98-
- You want to join multiple TAVs or apply advanced filtering
99-
- You need aggregations or transformations not available in your existing TAVs
100-
101-
**Query requirements**:
102-
- Must be valid SQL++ syntax for Couchbase Columnar
103-
- Include `LIMIT` clause for performance (recommended during testing)
104-
- Use proper escaping for database, scope, and view names with backticks
105-
106101
**Example custom query**:
107102
```sql
108103
SELECT airline.name AS airline_name,
@@ -133,7 +128,7 @@ After authentication, configure the connector by selecting your database, scope,
133128
- string/objects/arrays/null → STRING/TEXT (dimension)
134129
- Nested fields are flattened using dot and array index notation where possible (for example, `address.city`, `schedule[0].day`). Unstructured values may be stringified.
135130

136-
> **⚠️ 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.
131+
> **⚠️ Schema Inference Notes**: For TAVs, schema inference uses `array_infer_schema` on the entire dataset unless you specify Maximum Rows (which adds a LIMIT clause for sampling). Field types are inferred from the analyzed data and may miss variations (e.g., fields containing both text and numbers in different documents). If schema inference fails, ensure your TAV contains data and consider adding a Maximum Rows limit for faster sampling during testing.
137132
138133
Once your schema is configured, you can customize the fields in your Looker Studio dashboard:
139134

@@ -156,7 +151,7 @@ Once your schema is configured, you can customize the fields in your Looker Stud
156151
- **Schema inference errors**: Ensure your TAV exists and contains data. Try adding a `LIMIT` clause for faster sampling (e.g., `LIMIT 100`).
157152
- **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.
158153
- **Empty or missing TAV**: Verify that your Tabular Analytics View was saved correctly in the Analytics Workbench and contains data.
159-
- **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.
154+
- **Mixed data types**: If fields appear as STRING when they should be NUMBER, your data may have mixed types. Consider modifying your TAV creation query to cast fields to consistent types (e.g., `CAST(price AS NUMBER)`) or filter out inconsistent records.
160155

161156
## Next Steps
162157

-27.7 KB
Loading

0 commit comments

Comments
 (0)