Skip to content

lake: publish dbt integration docs - #23489

Open
awxxxxxx wants to merge 3 commits into
pingcap:release-8.5from
awxxxxxx:lake-publish-dbt-docs
Open

lake: publish dbt integration docs#23489
awxxxxxx wants to merge 3 commits into
pingcap:release-8.5from
awxxxxxx:lake-publish-dbt-docs

Conversation

@awxxxxxx

@awxxxxxx awxxxxxx commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

What is changed, added or deleted? (Required)

  • Minimally update the existing TiDB Cloud Lake dbt guide to use the native tidbcloudlake-dbt adapter while preserving the original document structure.
  • Update the adapter repository, installation command, supported snapshot capability, and Lake connection profile.
  • Restore Load with Platforms in the Lake TOC and publish the dbt guide under it.

Validation completed:

  • Installed tidbcloudlake-dbt==1.8.1 from public PyPI in a Python 3.11 Docker container and verified that dbt discovered the tidbcloudlake plugin.
  • Ran the complete tests/functional suite from lake-dbt commit 88dda1438951d27371466c01bb679d45be45ad96 against an isolated temporary database: 18 passed and 20 skipped.
  • Removed the temporary test database and verified the cleanup.
  • Passed Markdown lint, manual line-break checks, Lake TOC verification, internal and external link checks, legacy-term checks, and git diff --check.

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)

What is the related PR or file link(s)?

AI agent involvement

  • The changes in this PR were primarily made by an AI agent on behalf of the PR author.

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Summary by CodeRabbit

  • Documentation
    • Added a “Load with Platforms” entry to the TiDB Cloud Lake documentation.
    • Updated the dbt guide with the TiDB Cloud Lake adapter name and installation package.
    • Added Snapshot support to the feature matrix.
    • Updated the jaffle_shop tutorial with TiDB Cloud Lake connection settings.

@ti-chi-bot ti-chi-bot Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. contribution This PR is from a community contributor. labels Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 85709935-d477-49ca-a062-264f33e00bf8

📥 Commits

Reviewing files that changed from the base of the PR and between 220abb0 and 1a81972.

📒 Files selected for processing (2)
  • TOC-tidb-cloud-lake.md
  • tidb-cloud-lake/guides/load-with-dbt.md

Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The PR updates the TiDB Cloud Lake dbt guide. It renames the adapter, adds Snapshot support, updates installation and profile examples, and links the guide from the table of contents.

Changes

TiDB Cloud Lake dbt documentation

Layer / File(s) Summary
TiDB Cloud Lake dbt setup guide
tidb-cloud-lake/guides/load-with-dbt.md
The guide uses tidbcloudlake-dbt, documents Snapshot support, updates installation commands, and replaces the tutorial profile with TiDB Cloud Lake settings.
Guide table of contents link
TOC-tidb-cloud-lake.md
The table of contents adds a “Load with Platforms” subsection and links to the dbt guide.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1a819

This PR updates the TiDB Cloud Lake dbt documentation and navigation without introducing product or runtime behavior changes; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: sdojjy

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes publishing the TiDB Cloud Lake dbt integration documentation.
Description check ✅ Passed The description covers the required changes, target version, reference link, AI involvement, validation, and applicable change categories.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ti-chi-bot

ti-chi-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 11, 2026
@lilin90 lilin90 self-assigned this Aug 11, 2026
@lilin90 lilin90 added the translation/no-need No need to translate this PR. label Aug 11, 2026
@ti-chi-bot ti-chi-bot Bot removed the missing-translation-status This PR does not have translation status info. label Aug 11, 2026
@lilin90 lilin90 added the lake Related to TiDB Cloud Lake docs. label Aug 11, 2026
@lilin90
lilin90 marked this pull request as ready for review August 11, 2026 07:26
@ti-chi-bot ti-chi-bot Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 11, 2026
@lilin90
lilin90 marked this pull request as draft August 11, 2026 07:29
@ti-chi-bot ti-chi-bot Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 11, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c871e6d5-f5d2-4e58-aac3-ac99e9130215

📥 Commits

Reviewing files that changed from the base of the PR and between 84444c6 and 220abb0.

📒 Files selected for processing (2)
  • TOC-tidb-cloud-lake.md
  • tidb-cloud-lake/guides/load-with-dbt.md

Comment thread tidb-cloud-lake/guides/load-with-dbt.md Outdated
Comment thread tidb-cloud-lake/guides/load-with-dbt.md Outdated

- Python 3.8 or later
- A {{{ .lake }}} account and warehouse
- The host, database, username, password, and warehouse name for your {{{ .lake }}} connection

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- relevant document sections ---'
sed -n '1,110p' tidb-cloud-lake/guides/load-with-dbt.md

printf '%s\n' '--- warehouse references ---'
rg -n -C 3 '\bwarehouse\b|tidbcloudlake-dbt|lake-dbt' tidb-cloud-lake .github resources 2>/dev/null || true

printf '%s\n' '--- candidate adapter files ---'
git ls-files | rg -i 'dbt|adapter|profile|lake'

Repository: pingcap/docs

Length of output: 50371


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
import json
import urllib.request

def get(url):
    req = urllib.request.Request(url, headers={"User-Agent": "review-inspection"})
    with urllib.request.urlopen(req, timeout=20) as response:
        return json.load(response)

pypi = get("https://pypi.org/pypi/tidbcloudlake-dbt/json")
info = pypi["info"]
print("--- PyPI metadata ---")
for key in ("name", "version", "summary", "home_page", "project_urls", "requires_python", "requires_dist"):
    print(f"{key}: {info.get(key)}")

print("--- release files ---")
for item in pypi["releases"].get(info["version"], []):
    print(item.get("filename"), item.get("url"))

repo = get("https://api.github.com/repos/tidbcloud/lake-dbt")
print("--- GitHub repository ---")
for key in ("html_url", "default_branch", "visibility", "archived"):
    print(f"{key}: {repo.get(key)}")

for path in ("profiles.yml", "dbt/adapters/tidbcloudlake/connections.py",
             "dbt/adapters/tidbcloudlake/impl.py",
             "dbt/adapters/tidbcloudlake/__init__.py"):
    url = "https://api.github.com/repos/tidbcloud/lake-dbt/contents/" + path
    try:
        item = get(url)
    except Exception as exc:
        print(f"--- {path}: unavailable ({exc}) ---")
        continue
    print(f"--- {path} ---")
    print(item.get("download_url"))
PY

Repository: pingcap/docs

Length of output: 2469


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- PyPI project metadata ---'
curl -k -fsSL https://pypi.org/pypi/tidbcloudlake-dbt/json |
  jq '{name: .info.name, version: .info.version, project_urls: .info.project_urls,
       requires_python: .info.requires_python, requires_dist: .info.requires_dist,
       release_urls: [.releases[.info.version][] | .url]}'

printf '%s\n' '--- upstream repository metadata ---'
curl -k -fsSL https://api.github.com/repos/tidbcloud/lake-dbt |
  jq '{html_url, default_branch, visibility, archived}'

printf '%s\n' '--- upstream tree paths containing profile/connection/adapter ---'
curl -k -fsSL 'https://api.github.com/repos/tidbcloud/lake-dbt/git/trees/HEAD?recursive=1' |
  jq -r '.tree[] | select(.path | test("(?i)(profile|connection|adapter|config)")) | .path'

Repository: pingcap/docs

Length of output: 1133


🏁 Script executed:

#!/bin/bash
set -eu

wheel=/tmp/tidbcloudlake_dbt-1.8.1-py3-none-any.whl
curl -k -fsSL \
  'https://files.pythonhosted.org/packages/a7/48/34e912b921839e80f6d722136e9624ab89fe899aa3aef6c781ec56c99a2e/tidbcloudlake_dbt-1.8.1-py3-none-any.whl' \
  -o "$wheel"

python3 - "$wheel" <<'PY'
import re
import sys
import zipfile

wheel = sys.argv[1]
with zipfile.ZipFile(wheel) as z:
    names = z.namelist()
    print("--- package files ---")
    for name in names:
        if name.endswith((".py", ".yml", ".yaml", ".json", ".toml")):
            print(name)

    print("--- relevant source lines ---")
    for name in names:
        if not name.endswith(".py"):
            continue
        text = z.read(name).decode("utf-8", "replace")
        if re.search(r"warehouse|Profile|Connection|credentials|required", text, re.I):
            print(f"### {name}")
            for number, line in enumerate(text.splitlines(), 1):
                if re.search(r"warehouse|Profile|Connection|credentials|required", line, re.I):
                    print(f"{number}: {line}")
PY

printf '%s\n' '--- upstream repository metadata ---'
curl -k -fsSL https://api.github.com/repos/tidbcloud/lake-dbt |
  jq '{html_url, default_branch, visibility, archived}'

printf '%s\n' '--- upstream tree paths ---'
curl -k -fsSL 'https://api.github.com/repos/tidbcloud/lake-dbt/git/trees/HEAD?recursive=1' |
  jq -r '.tree[] | select(.path | test("(?i)(profile|connection|adapter|config)")) | .path'

Repository: pingcap/docs

Length of output: 4497


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
import zipfile

wheel = "/tmp/tidbcloudlake_dbt-1.8.1-py3-none-any.whl"
with zipfile.ZipFile(wheel) as z:
    for name in (
        "dbt/include/tidbcloudlake/profile_template.yml",
        "dbt/adapters/tidbcloudlake/connections.py",
    ):
        print(f"--- {name} ---")
        for number, line in enumerate(z.read(name).decode().splitlines(), 1):
            if name.endswith("profile_template.yml") or 30 <= number <= 170:
                print(f"{number}: {line}")

    source = z.read("dbt/adapters/tidbcloudlake/connections.py").decode()
    namespace = {}
    # Extract only the deterministic DSN-building logic for a read-only probe.
    start = source.index("    def build_dsn")
    end = source.index("    `@classmethod`", start)
    print("--- build_dsn source slice ---")
    print(source[start:end])
PY

Repository: pingcap/docs

Length of output: 6419


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
import zipfile

wheel = "/tmp/tidbcloudlake_dbt-1.8.1-py3-none-any.whl"
with zipfile.ZipFile(wheel) as z:
    for name in (
        "dbt/include/tidbcloudlake/profile_template.yml",
        "dbt/adapters/tidbcloudlake/connections.py",
    ):
        print(f"--- {name} ---")
        for number, line in enumerate(z.read(name).decode().splitlines(), 1):
            if name.endswith("profile_template.yml") or 30 <= number <= 170:
                print(f"{number}: {line}")

    source = z.read("dbt/adapters/tidbcloudlake/connections.py").decode()
    start = source.index("    def build_dsn")
    end = source.index("    `@classmethod`", start)
    print("--- build_dsn source slice ---")
    print(source[start:end])
PY

Repository: pingcap/docs

Length of output: 6419


Treat warehouse as an optional profile field.

Keep the warehouse resource in the prerequisites, but do not list the optional warehouse profile value as required.

Committable suggestion
Suggested change
- The host, database, username, password, and warehouse name for your {{{ .lake }}} connection
- The host, database, username, and password for your {{{ .lake }}} connection; optionally, the warehouse name if you want to select a warehouse explicitly

Source: Path instructions

@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@lilin90
lilin90 requested a review from sdojjy August 17, 2026 02:30
@lilin90 lilin90 added the for-cloud-release This PR is related to TiDB Cloud release. label Aug 17, 2026
@awxxxxxx
awxxxxxx force-pushed the lake-publish-dbt-docs branch from 220abb0 to b1c3769 Compare August 17, 2026 07:33
@ti-chi-bot

ti-chi-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from lilin90. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 17, 2026
@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 17, 2026
@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 17, 2026
@ti-chi-bot

ti-chi-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-08-17 08:27:47.32139979 +0000 UTC m=+3639853.357494847: ☑️ agreed by lilin90.

@lilin90
lilin90 marked this pull request as ready for review August 17, 2026 08:27
@ti-chi-bot ti-chi-bot Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 17, 2026
@ti-chi-bot

ti-chi-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

@sdojjy: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@lilin90 lilin90 added the lgtm label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution This PR is from a community contributor. for-cloud-release This PR is related to TiDB Cloud release. lake Related to TiDB Cloud Lake docs. lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/no-need No need to translate this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants