Turntable Documentation
website·Indexed 29 days ago
https://turntable-so.github.io/docsDocumentation for the Turntable VSCode extension, featuring guides on installation, requirements for DBT projects, and tools for generating and viewing column-level lineage and documentation.
What's inside Turntable
- Column-level lineage (CLL) provides a detailed visualization of the connections between individual columns across tables in a data warehouse, rather than just table-to-table relationships. It is used to accelerate debugging by showing how a column is calculated without manual code review and to facilitate knowledge sharing within data teams.
Turntable product availability and pricing
Turntable is currently in a closed beta. The full product is free during this period, and the developers plan to maintain a free tier in the future.Edit model and column documentation via the extension pane
To edit documentation, modify the model and column description fields in the extension pane and pressSave. The extension automatically updates the corresponding YAML file or creates a new one if it doesn't exist. After saving, a notification appears in the bottom right; clickingView Changesopens a diff view of the updated YAML file.Verify system and software requirements for Turntable installation
Before installing Turntable, ensure your environment meets the following minimum requirements:
- Platform: Mac (ARM or Intel), Windows (x86), or Linux (x86 or ARM).
- Visual Studio Code: Version 1.7.8 or greater.
- Build Tools: XCode command line tools (Mac), Visual C++ build tools (Windows), or gcc (Linux).
- Python: Version 3.9 or above.
- Python Packages:
dbt-coreand your specific dbt adapter must be installed. - dbt Project Health: The project must be able to successfully execute
dbt parse,dbt compile, anddbt docs generate --no compile.
Open the Turntable lineage view in VS Code
To open the lineage view, open a dbt model in your project and click the "Turntable" pane in the VS Code panel. The table-level lineage will load first, followed by column-level lineage a few seconds later. Note: Column-level lineage requires specific pre-requisites to be met before it will function.Inspect lineage edges and types
Click on a lineage edge to open a popup containing key details and the edge type. Edge colors correspond to their type, with a key available at the bottom right of the lineage graph. Edges with multiple colors or gradients encompass multiple edge types.Generate documentation using the Autofill feature
Use the
🪄 Autofillbutton to automatically generate first-draft column descriptions using AI. The process involves:- Clicking the
🪄 Autofillbutton. - Selecting the target model and the specific column descriptions to update (fields without existing descriptions are selected by default).
- Clicking
OKto trigger the AI generation. - Reviewing the generated content and making manual adjustments if necessary.
- Clicking
Saveto commit the changes to the YAML files.
- Clicking the
Refresh the lineage view
Click the 🔄 button at the top right of the pane to refresh the lineage view and return it to the default state.
Caveats:
- Refreshing recompiles the model but does not automatically account for upstream or downstream schema changes.
- Turntable uses the
catalog.jsonfile for schema information. You must materialize changes (e.g., by runningdbt run) for catalog changes to take effect in the view.
Manage Turntable telemetry and AI data sharing in VSCode
Users can opt out of telemetry and AI data processing (sending model metadata and code to OpenAI and Anthropic) via the VSCode settings UI. To prevent any data from leaving the local machine, both telemetry and AI options must be disabled.1. Press Ctrl + Shift + P 2. Type 'settings' to open the VSCode settings UI 3. To disable telemetry: Search for 'turntable telemetry' and uncheck the box 4. To disable AI data sharing: Search for 'turntable ai' and uncheck the boxConfigure Python interpreter and dbt packages in VS Code
To ensure Turntable uses the correct Python environment:
- Select Interpreter: Press
Control + Shift + P, typePython: Select Interpreter, and choose the environment with Python 3.9+ (or 3.8+ as per remedy notes). If you cannot find the path, rundbt debugin the terminal and check thepython_pathoutput. - Install Adapter: Press
Control + Shift + P, typePython: Create Terminal, and install your specific dbt adapter using pip.
pip install dbt-{adapter}- Select Interpreter: Press
Prepare requirements for Turntable onboarding
Before configuring the extension, gather the following project details to ensure a successful onboarding process:
- Python Interpreter Path: Supported versions are 3.9, 3.10, and 3.11.
- dbt Version: Supported versions are 1.3, 1.4, 1.5, and 1.6 (Note: dbt 1.3 is incompatible with Python 3.11).
- dbt Adapter: Supported adapters include Snowflake, Bigquery, Databricks, Redshift, and Postgres.
- profiles.yml Location: The default location (e.g.,
~/.dbtor project directory) or any absolute folder path. - Environmental Variables: Any project-specific variables (must be specified individually;
.envfiles are not yet supported).
Address Column-Level Lineage limitations and requirements
Turntable's CLL approach uses
sqlglotto parse dbt code into an abstract syntax tree. To ensure accurate lineage, users should follow these requirements and mitigations:- Catalog Dependency: Turntable relies on
catalog.json. Ensure you have credentials to rundbt docs generateand that models (and their ancestors) are materialized viadbt runafter code updates. - SQL Parsing: If SQL cannot be parsed, only table-level lineage is shown. To mitigate this, qualify columns (e.g.,
table.idinstead ofid) when using multiple joins. - Function References: Table references that are functions (e.g.,
UNNESTclauses) may result in incomplete lineage. UseSELECTstatements where possible. - Supported Warehouses: Currently, only BigQuery and Snowflake are supported.
- Catalog Dependency: Turntable relies on