Feat: Add Tableau context-source adapter - #344
Open
sailingsam wants to merge 4 commits into
Open
Conversation
…ient, fetch, tests) Adds a new `tableau` context source under packages/cli/src/context/ingest/adapters/tableau/, modeled on the Sigma adapter's scaffolding and Looker's graph-shaped semantic model. This first commit covers the read path: PAT sign-in (REST) + published data sources, calculated fields, and workbook metadata via the Metadata API (GraphQL), staged to disk and chunked into work units. - client.ts: PAT auth + Metadata GraphQL, retry + 401 re-auth, offset paging - fetch.ts: stages datasources/<luid>.json + workbooks/<luid>.json + manifest - detect.ts / chunk.ts: bundle detection + data-source / workbook work units - driver-schemas.ts: `tableau` connection (host, site, PAT via env:/file: ref) - wired into local-adapters, setup-sources, setup-commands, public-ingest - Vitest suite (client, fetch, detect, chunk, adapter, client-boundary) with fixtures under test/fixtures/tableau/ Note: the issue's path packages/context/src/ingest/adapters/tableau/ is stale; the real location is packages/cli/src/context/ingest/adapters/tableau/. Wiki output (tableau_ingest skill) and deterministic semantic-layer projection follow in subsequent commits. Refs Kaelio#166.
Adds packages/cli/src/skills/tableau_ingest/SKILL.md, the memory-agent skill loaded for tableau-datasources / tableau-workbooks work units. It extracts durable ktx wiki knowledge from published data sources (field names, calculated-field formulas as metric definitions) and workbook summaries via context_candidate_write, with the standard identifier-verification protocol. v1 is wiki-only: the skill states that no semantic-layer YAML is written for Tableau yet (deterministic project() follows in the next commit). Registers tableau_ingest in the memory-runtime-assets adapter-skill and verification-writer checks. Refs Kaelio#166.
Adds a Tableau section to the context-sources integration guide (connection config, PAT auth via env:/file: reference, Cloud vs Server host, data source / workbook filters, and a pointer to the free Tableau Developer Program sandbox) and lists `tableau` in the driver table, page description, and README connector list. Notes that this release is wiki-only; deterministic semantic-layer projection is planned for a follow-up. Refs Kaelio#166.
…ression test Captured a real staged bundle by running the adapter's fetch() against a live Tableau Cloud (Developer) site's built-in "Superstore" sample data source, and committed it under test/fixtures/tableau/superstore-live/. Adds a regression test that detects, chunks, and parses the real bundle and asserts the "Profit Ratio" calculated field (formula SUM([Profit])/SUM([Sales])) and the upstream lineage are surfaced. This grounds the adapter in genuine Metadata API output: confirms the GraphQL field selection (luid, name, role, dataType, CalculatedField.formula, upstreamTables) matches the live schema. Refs Kaelio#166.
|
@sailingsam is attempting to deploy a commit to the Kaelio Team on Vercel. A member of the Team first needs to authorize it. |
sailingsam
marked this pull request as ready for review
July 5, 2026 23:02
This was referenced Jul 5, 2026
|
will check this over the weekend! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #166.
Adds a
tableaucontext source that ingests published data sources, calculated fields, and workbook metadata from Tableau Cloud / Tableau Server via the REST API (PAT auth) + Metadata API (GraphQL).Approach
tableau_ingestskill turns data sources and workbooks into ktx wiki knowledge (calculated-field formulas → candidate metric definitions). Deterministic semantic-layer projection (project()) is intentionally left as a follow-up — see note below.env:/file:reference (existingresolveKtxConfigReferencehelper).Acceptance criteria
adapters/tableau/with testswiki/global/Markdown (the "and/or" wiki branch; SL YAML deferred — see below)env:orfile:referencecontext-sources.mdx+ README)Verified live end-to-end
Ran the adapter against a real Tableau Cloud (Developer Program) site:
The captured bundle is committed as a real-data test fixture (
test/fixtures/tableau/superstore-live/), so the adapter is grounded in genuine Metadata API output, not hand-authored shapes.Screenshots
sales overview) using theProfit Ratiocalculated field:Why
project()(semantic-layer YAML) is a follow-upDeterministic SL projection maps a data source's upstream warehouse tables to ktx semantic-layer sources. Faithfully building + testing this needs a warehouse-backed Tableau data source (Snowflake/Postgres/etc.); the sample data available for this PR is Excel-backed (upstream tables are workbook sheets, no warehouse schema), so an SL projection couldn't be exercised end-to-end. Rather than ship an unverified mapping, this PR is wiki-only (which satisfies the acceptance criteria's "and/or"), and SL projection will follow once a warehouse-backed test source is available.
Testing
tsctypecheck + Biome clean