You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorial/markdown/connectors/looker-studio/columnar/readme.md
+21-26Lines changed: 21 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
# frontmatter
3
3
path: "/tutorial-looker-studio-columnar"
4
4
# 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
6
6
short_title: Columnar Looker Studio Connector
7
7
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
10
10
- Learn authentication, configuration, schema inference, and troubleshooting
11
11
content_type: tutorial
12
12
filter: connectors
@@ -27,9 +27,9 @@ length: 20 Mins
27
27
28
28
## Overview
29
29
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.
31
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.
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.
33
33
34
34
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.
35
35
@@ -53,19 +53,24 @@ When you add the Couchbase Columnar connector in Looker Studio, you'll see the a
53
53
54
54

55
55
56
-
## Create Tabular Analytics Views (TAVs) in Capella (Required)
56
+
## Create Tabular Analytics Views (TAVs) in Capella (Recommended)
57
57
58
-
Before connecting, create Tabular Analytics Views in Capella:
58
+
For the "By View" mode, create Tabular Analytics Views in Capella:
59
59
60
60
1. Open your Capella cluster, go to the Analytics tab, and launch the Analytics Workbench.
61
61
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:
62
62
63
63
```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
+
SELECTa.airportnameAS airport_name,
66
+
a.cityAS city,
67
+
a.countryAS 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
+
WHEREa.country='United States'
73
+
LIMIT100;
69
74
```
70
75
71
76
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';
- Configuration Mode: Choose between `By View`or `Use Custom Query`.
80
85
81
86
### Mode: By View (TAV)
82
87
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.
84
89
- Maximum Rows: Optional limit for returned rows; leave blank for no limit.
85
90
86
91
What runs:
@@ -93,16 +98,6 @@ What runs:
93
98
- Custom Columnar Query: Enter your own SQL++ query directly in a text area.
94
99
- Maximum Rows: Not applicable (control limits within your query using `LIMIT`).
95
100
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
-
106
101
**Example custom query**:
107
102
```sql
108
103
SELECTairline.nameAS airline_name,
@@ -133,7 +128,7 @@ After authentication, configure the connector by selecting your database, scope,
- Nested fields are flattened using dot and array index notation where possible (for example, `address.city`, `schedule[0].day`). Unstructured values may be stringified.
135
130
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 numbersin different documents). If schema inference fails, ensure your TAV contains data and consider adding a Maximum Rows limit for faster sampling during testing.
137
132
138
133
Once your schema is configured, you can customize the fields in your Looker Studio dashboard:
139
134
@@ -156,7 +151,7 @@ Once your schema is configured, you can customize the fields in your Looker Stud
156
151
-**Schema inference errors**: Ensure your TAV exists and contains data. Try adding a `LIMIT` clause for faster sampling (e.g., `LIMIT 100`).
157
152
-**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.
158
153
-**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.
0 commit comments