Skip to content

Commit 4bf7c9f

Browse files
authored
docs(connectors): add Looker Studio Data API + Columnar readmes (#64)
* docs(connectors): add Looker Studio Data API + Columnar readmes; mark Columnar as views-only and add Capella view setup - Add detailed Data API readme: PATH_USER_PASS auth, collection vs custom SQL++ modes, schema inference (INFER + fallback), limits, troubleshooting - Rewrite Columnar readme as views-only: required Capella view creation steps with SQL++ example, links to docs; remove collection/custom query modes; add future scope note (collections prototype) - Standardize tutorial frontmatter across both readmes Files: - couchbase-tutorials/tutorial/markdown/connectors/looker-studio/dataapi/readme.md - couchbase-tutorials/tutorial/markdown/connectors/looker-studio/columnar/readme.md * docs(connectors): update Looker Studio readmes for Columnar and Data API - Change SDK language from JavaScript to Node.js in both readmes. - Clarify prerequisites and instructions in the Columnar readme by removing references to Collections. - Update the Data API readme to enhance clarity in SQL++ query descriptions and schema inference details. Files: - tutorial/markdown/connectors/looker-studio/dataapi/readme.md - tutorial/markdown/connectors/looker-studio/columnar/readme.md * docs(looker-studio): update Columnar readme to reflect Tabular Analytics Views (TAVs) - Revised title and description to specify TAVs instead of views. - Updated instructions and prerequisites to clarify the use of TAVs in Capella. - Adjusted sections throughout the document to consistently reference TAVs for improved clarity. Files: - tutorial/markdown/connectors/looker-studio/columnar/readme.md * fix(test): update title length validation and add new tags - Increased the maximum allowed title length from 72 to 100 characters for better flexibility. - Added new tags related to Looker Studio and data connectors to enhance categorization. Files: - test/test-markdown-frontmatter.js * 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 * docs(looker-studio): update short title in Columnar readme for clarity - Changed the short title to "Columnar Looker Studio Connector" for improved specificity. - Adjusted the description to remove redundancy while maintaining clarity about the connection process using Tabular Analytics Views (TAVs). Files: - tutorial/markdown/connectors/looker-studio/columnar/readme.md * docs(looker-studio): enhance Data API readme with schema inference limitations and troubleshooting tips - Added a section detailing schema inference limitations, including issues with mixed data types, incomplete sampling, and nested object depth. - Expanded troubleshooting section with specific guidance on authentication errors, schema inference problems, and query issues. - Improved best practices for data structure and query execution to optimize schema inference and performance. Files: - tutorial/markdown/connectors/looker-studio/dataapi/readme.md * docs(looker-studio): enhance Columnar readme with authentication and configuration visuals - Added images for the authentication screen, database scope view configuration, field customization, and report creation in Looker Studio. - Expanded instructions to guide users through the setup process after adding the Couchbase Columnar connector. - Improved clarity on the steps required to create reports using TAV-backed fields. Files: - tutorial/markdown/connectors/looker-studio/columnar/readme.md * docs(looker-studio): update Columnar readme with new Couchbase link for setup information - Revised the prerequisites section to replace the outdated Couchbase Columnar setup link with the current link to the Couchbase Analytics product page. - Ensured clarity and accuracy in the documentation for users setting up the connector. Files: - tutorial/markdown/connectors/looker-studio/columnar/readme.md * fixed readme based on comments * updated based on feedback * added more urls * added more urls here as well * made query simple and removed flattening * moved the section
1 parent 4d03c3b commit 4bf7c9f

File tree

7 files changed

+478
-2
lines changed

7 files changed

+478
-2
lines changed

test/test-markdown-frontmatter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const chalk = require('chalk')
66
// accepted data field values
77
const sdk_languages = ['nodejs', 'scala', 'python', 'swift', 'csharp', 'objective-c', 'android-java', 'any', 'java', 'kotlin', 'dart', 'golang', 'c++']
88

9-
const tags = ['Ottoman', 'Ktor', 'REST API', 'Express', 'Flask', 'TLS', 'Configuration', 'Next.js', 'iOS', 'Xcode', '.NET', 'Xamarin', 'Authentication', 'OpenID', 'Keycloak', 'Android', 'P2P', 'UIKit', 'Installation', 'Spring Boot', 'Spring Data', 'Transactions', 'SQL++ (N1QL)', 'Optimization', 'Community Edition', 'Docker', 'Data Modeling', 'Metadata', 'Best Practices', 'Data Ingestion', 'Kafka', 'Support', 'Customer', 'Prometheus', 'Monitoring', 'Observability', 'Metrics', 'Query Workbench', 'ASP.NET', 'linq', 'DBaaS', 'App Services', 'Flutter', 'Gin Gonic', 'FastAPI', 'LangChain', "OpenAI", "Streamlit", 'Google Gemini', 'Nvidia NIM', 'LLama3', 'AWS', 'Artificial Intelligence', 'Cohere', 'Jina AI', 'Mistral AI', 'Ragas', 'Haystack', 'LangGraph', 'Amazon Bedrock', 'CrewAI', 'PydanticAI', 'C++', 'C++ SDK', 'smolagents', 'Ag2', 'Autogen', 'Couchbase Edge Server', 'Deepseek', 'OpenRouter', 'mastra']
9+
const tags = ['Ottoman', 'Ktor', 'REST API', 'Express', 'Flask', 'TLS', 'Configuration', 'Next.js', 'iOS', 'Xcode', '.NET', 'Xamarin', 'Authentication', 'OpenID', 'Keycloak', 'Android', 'P2P', 'UIKit', 'Installation', 'Spring Boot', 'Spring Data', 'Transactions', 'SQL++ (N1QL)', 'Optimization', 'Community Edition', 'Docker', 'Data Modeling', 'Metadata', 'Best Practices', 'Data Ingestion', 'Kafka', 'Support', 'Customer', 'Prometheus', 'Monitoring', 'Observability', 'Metrics', 'Query Workbench', 'ASP.NET', 'linq', 'DBaaS', 'App Services', 'Flutter', 'Gin Gonic', 'FastAPI', 'LangChain', "OpenAI", "Streamlit", 'Google Gemini', 'Nvidia NIM', 'LLama3', 'AWS', 'Artificial Intelligence', 'Cohere', 'Jina AI', 'Mistral AI', 'Ragas', 'Haystack', 'LangGraph', 'Amazon Bedrock', 'CrewAI', 'PydanticAI', 'C++', 'C++ SDK', 'smolagents', 'Ag2', 'Autogen', 'Couchbase Edge Server', 'Deepseek', 'OpenRouter', 'mastra', 'Looker Studio', 'Google Data Studio', 'Connector', 'Couchbase Columnar', 'TAVs', 'Custom Queries', 'Data API']
1010

1111
const technologies = ['connectors', 'kv', 'query', 'capella', 'server', 'index', 'mobile', 'fts', 'sync gateway', 'eventing', 'analytics', 'udf', 'vector search', 'react', 'edge-server', 'app-services']
1212

@@ -95,7 +95,7 @@ const test = (data, path) => {
9595
process.exit(1)
9696
}
9797
//testing title length
98-
if (data.title?.length > 72) {
98+
if (data.title?.length > 100) {
9999
makeResponseFailure(data, path, 'Invalid title Length', data.title?.length, 'Post title must be less than 72 characters long')
100100
process.exit(1)
101101
}
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
---
2+
# frontmatter
3+
path: "/tutorial-looker-studio-columnar"
4+
# title and description do not need to be added to markdown, start with H2 (##)
5+
title: Connect Looker Studio to Couchbase Columnar using Views and Custom Queries
6+
short_title: Columnar Looker Studio Connector
7+
description:
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+
- Learn authentication, configuration, schema inference, and troubleshooting
11+
content_type: tutorial
12+
filter: connectors
13+
technology:
14+
- server
15+
- query
16+
tags:
17+
- Looker Studio
18+
- Couchbase Columnar
19+
- Connector
20+
- TAVs
21+
- Custom Queries
22+
sdk_language:
23+
- nodejs
24+
length: 20 Mins
25+
---
26+
27+
<!-- [abstract] -->
28+
29+
## Overview
30+
31+
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.
32+
33+
**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.
34+
35+
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.
36+
37+
## Prerequisites
38+
39+
To use this connector, you need:
40+
41+
### Couchbase Columnar Access
42+
- **Sign up**: Visit [Couchbase Capella](https://cloud.couchbase.com/) to create your account
43+
- **Free Trial**: Start with a free trial to test the connector
44+
- **Columnar Service**: Enable Columnar analytics in your Capella cluster
45+
- **Pricing**: Columnar is billed based on compute and storage usage. See [Capella Pricing](https://www.couchbase.com/pricing/capella/) for details
46+
47+
### Technical Requirements
48+
- A Couchbase Columnar deployment reachable from Looker Studio. For setup information, see [Getting Started with Couchbase Columnar](https://www.couchbase.com/products/analytics/).
49+
- A database user with permissions to read from the target Tabular Analytics Views (TAVs) and execute queries.
50+
- Network access from Looker Studio to your Columnar host.
51+
52+
## Installation
53+
54+
To add the Couchbase Columnar connector to your Looker Studio reports:
55+
56+
1. **Open Looker Studio**: Go to [Looker Studio](https://lookerstudio.google.com/)
57+
2. **Create or Open Report**: Start a new report or open an existing one
58+
3. **Add Data Source**: Click "Add data" or the "+" button
59+
4. **Find Connector**: Search for "Couchbase Columnar" in the connector gallery
60+
5. **Authorize**: Grant necessary permissions when prompted
61+
6. **Configure**: Follow the authentication and configuration steps below
62+
63+
## Authentication
64+
65+
When adding the data source, provide:
66+
67+
- Path: The Columnar host. Example:
68+
- Capella host: `cb.<your-host>.cloud.couchbase.com`
69+
- Username and Password: Database credentials.
70+
71+
The connector validates credentials by running a lightweight test query (`SELECT 1 AS test;`).
72+
73+
When you add the Couchbase Columnar connector in Looker Studio, you'll see the authentication screen:
74+
75+
![Authentication Screen](step-0.png "Couchbase Columnar connector authentication screen in Looker Studio")
76+
77+
## Create Tabular Analytics Views (TAVs) in Capella (Recommended)
78+
79+
For the "By View" mode, create Tabular Analytics Views in Capella:
80+
81+
1. **Open Analytics Workbench**: In your Capella cluster, go to the Analytics tab and launch the Analytics Workbench.
82+
83+
2. **Create your SQL++ query**: Write a query that returns the data structure you want for reporting:
84+
85+
```sql
86+
-- Example airport query for TAV creation
87+
SELECT a.airportname,
88+
a.city,
89+
a.country,
90+
a.faa,
91+
a.icao
92+
FROM `travel-sample`.`inventory`.`airport` AS a
93+
WHERE a.country = 'United States'
94+
LIMIT 100;
95+
```
96+
97+
3. **Test the query**: Run your query to verify it returns the expected results and data types.
98+
99+
4. **Create the TAV**:
100+
- Click **Save as View** in the Analytics Workbench
101+
- Select **Annotate for Tabular View**
102+
- **Define the schema**: Specify column names, data types (STRING, NUMBER, BOOLEAN), and mark primary key fields
103+
- **Name your view**: Use a descriptive name like `airports_us_flattened`
104+
- **Save**: The TAV will be created with enforced schema
105+
106+
5. **Verify creation**: Your TAV will appear in the database browser under the specified scope and can be queried like a table.
107+
108+
- 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).
109+
110+
## Configuration
111+
112+
Choose your mode in the configuration screen:
113+
114+
- Configuration Mode: Choose between `By View` or `Use Custom Query`.
115+
116+
### Mode: By View (TAV)
117+
118+
- Couchbase Database, Scope, View: Selected from dropdowns that automatically discover your available databases, scopes, and views from your Columnar instance.
119+
- Maximum Rows: Optional limit for returned rows; leave blank for no limit.
120+
121+
What runs:
122+
123+
- Data: `SELECT <requested fields or *> FROM \`database\`.\`scope\`.\`view\` [LIMIT n]`
124+
- Schema: `SELECT array_infer_schema((SELECT VALUE t FROM \`database\`.\`scope\`.\`view\` [LIMIT n])) AS inferred_schema;`
125+
126+
### Mode: By Custom Query
127+
128+
- Custom Columnar Query: Enter your own SQL++ query directly in a text area.
129+
- Maximum Rows: Not applicable (control limits within your query using `LIMIT`).
130+
131+
**Example custom query**:
132+
```sql
133+
SELECT airline.name AS airline_name,
134+
airline.iata AS iata_code,
135+
airline.country AS country,
136+
COUNT(*) AS route_count
137+
FROM `travel-sample`.`inventory`.`airline` AS airline
138+
JOIN `travel-sample`.`inventory`.`route` AS route
139+
ON airline.iata = route.airline
140+
WHERE airline.country = "United States"
141+
GROUP BY airline.name, airline.iata, airline.country
142+
LIMIT 100;
143+
```
144+
145+
What runs:
146+
- Data: Your exact custom query as entered
147+
- Schema: `SELECT array_infer_schema((your_custom_query)) AS inferred_schema;`
148+
149+
After authentication, configure the connector by selecting your database, scope, and view:
150+
151+
![Database Scope View Configuration](step-1.png "Configuring database, scope, and view selection in Looker Studio")
152+
153+
## Schema and Field Types
154+
155+
- The connector converts inferred types to Looker types:
156+
- number → NUMBER (metric)
157+
- boolean → BOOLEAN (dimension)
158+
- string/objects/arrays/null → STRING/TEXT (dimension)
159+
- Nested fields are flattened using dot and array index notation where possible (for example, `address.city`, `schedule[0].day`). Unstructured values may be stringified.
160+
161+
> **⚠️ 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.
162+
163+
Once your schema is configured, you can customize the fields in your Looker Studio dashboard:
164+
165+
![Field Configuration in Dashboard](step-2.png "Configuring fields in Looker Studio dashboard before creating reports")
166+
167+
## Data Retrieval
168+
169+
- 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.
170+
- Row limits:
171+
- View mode: `Maximum Rows` controls `LIMIT` (blank = no limit).
172+
173+
## Tips and Best Practices
174+
175+
- **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.
176+
- **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.
177+
178+
## Troubleshooting
179+
180+
- **Authentication failure**: Check host, credentials, and network reachability to Columnar.
181+
- **Schema inference errors**: Ensure your TAV exists and contains data. Try adding a `LIMIT` clause for faster sampling (e.g., `LIMIT 100`).
182+
- **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.
183+
- **Empty or missing TAV**: Verify that your Tabular Analytics View was saved correctly in the Analytics Workbench and contains data.
184+
- **Schema mismatch**: If fields appear with unexpected types, verify your TAV schema definition matches your query results. TAVs enforce schema consistency, so ensure your query produces data that matches the defined column types.
185+
186+
## Next Steps
187+
188+
Once your connector is configured and fields are set up, create reports by dragging and dropping tables from the side pane onto the main canvas:
189+
190+
![Creating Reports in Looker Studio](step-3.png "Creating reports by dragging and dropping tables onto the canvas in Looker Studio")
191+
192+
- Build charts in Looker Studio using your TAV-backed fields.
193+
- Iterate on Views/queries to shape the dataset for analytics.
194+
- Explore the rich visualization options available in Looker Studio to create compelling dashboards from your Columnar data.
195+
196+
## Support
197+
198+
For assistance with the Couchbase Columnar Looker Studio connector:
199+
200+
### Technical Support
201+
- **Documentation**: Complete guides at [Couchbase Developer Portal](https://developer.couchbase.com/)
202+
- **Community Forum**: Get help from the community at [Couchbase Forums](https://forums.couchbase.com/)
203+
- **Developer Community**: Connect with [Couchbase Developer Community](https://www.couchbase.com/developers/community/)
204+
- **Discord**: Join real-time discussions on [Couchbase Discord](https://discord.gg/sQ5qbPZuTh)
205+
206+
### Issue Reporting
207+
- **Connector Issues**: Report bugs or feature requests through [Couchbase Support](https://support.couchbase.com/hc/en-us)
208+
- **General Contact**: For other inquiries, use [Couchbase Contact](https://www.couchbase.com/contact/)
209+
- **Response Time**: We aim to respond to connector issues within 2-3 business days
210+
- **Known Limitations**: Check the troubleshooting section above for common issues
211+
212+
### Resources
213+
- **Couchbase Columnar Documentation**: [Official Docs](https://docs.couchbase.com/columnar/intro/intro.html)
214+
- **Looker Studio Help**: [Google Looker Studio Support](https://support.google.com/looker-studio/)
215+
- **Sample Data**: Use travel-sample bucket for testing and examples
216+
- **API Documentation**: [Columnar Management API](https://docs.couchbase.com/columnar/management-api-guide/management-api-intro.html)
217+
218+
## Privacy Policy
219+
220+
**Connector Data Usage**: This connector accesses your Couchbase Columnar credentials and query results solely for data integration with Looker Studio. No data is stored permanently by the connector, and all processing occurs within Google's Looker Studio environment.
221+
222+
**Official Privacy Policy**: For complete information about how Couchbase handles your data, please review our official [Couchbase Privacy Policy](https://www.couchbase.com/privacy-policy/).
223+
224+
**Google Looker Studio**: This connector operates within Google Looker Studio, which has its own data handling policies. Please review [Google's Privacy Policy](https://policies.google.com/privacy) for their data practices.
225+
226+
## Terms of Service
227+
228+
**Connector Usage**: Use this connector only with Couchbase Columnar instances you own or have permission to access. Maintain security of your credentials and comply with your organization's data governance policies.
229+
230+
**Official Terms**: Your use of Couchbase products and services is governed by our official [Couchbase Terms of Use](https://www.couchbase.com/terms-of-use/). For enterprise customers, additional terms may apply under your specific [Couchbase License Agreement](https://www.couchbase.com/legal/agreements/).
231+
232+
**Google Looker Studio**: This connector operates within Google Looker Studio and is subject to [Google's Terms of Service](https://policies.google.com/terms).
233+
234+
## Legal
235+
236+
**Copyright**: © 2024 Couchbase, Inc. All rights reserved.
237+
238+
**Legal Information**: For comprehensive legal information, licensing terms, and trademark policies, visit [Couchbase Legal](https://www.couchbase.com/legal/) and our [Trademark Policy](https://www.couchbase.com/trademark-policy/).
239+
240+
**Trademarks**: Couchbase and the Couchbase logo are trademarks of Couchbase, Inc. Google Looker Studio is a trademark of Google LLC.
241+
242+
**Contact**: For legal inquiries, contact [[email protected]](mailto:[email protected]).
243+
244+
284 KB
Loading
92.9 KB
Loading
121 KB
Loading
233 KB
Loading

0 commit comments

Comments
 (0)