DBT adapter for YDB
Project description
dbt-ydb
dbt-ydb is a plugin for dbt that provides support for working with YDB. dbt-ydb adapter is in preview stage and does not currently support all dbt features. The sections below list the supported features and known limitations.
Installation
To install plugin, execute the following command:
pip install dbt-ydb
Supported features
- Table materialization
- View materialization
- Seeds
- Docs generate
- Tests
- Incremental materializations (
mergestrategy only) - Snapshots
Limitations
YDBdoes not support CTEYDBrequires a primary key to be specified for its tables. See the configuration section for instructions on how to set it.source()macro requires you to specify aschema. Use/if your source is in root folder.
Usage
Profile Configuration
To configure YDB connection, fill profile.yml file as below:
profile_name:
target: dev
outputs:
dev:
type: ydb
host: [localhost] # YDB host
port: [2136] # YDB port
database: [/local] # YDB database
schema: [<empty string>] # Optional subfolder for DBT models
secure: [False] # If enabled, grpcs protocol will be used
root_certificates_path: [<empty string>] # Optional path to root certificates file
# Static Credentials
username: [<empty string>]
password: [<empty string>]
# Access Token Credentials
token: [<empty string>]
# Service Account Credentials
service_account_credentials_file: [<empty string>]
Model Configuration
View
| Option | Description | Required | Default |
|---|
Table
| Option | Description | Required | Default |
|---|---|---|---|
primary_key |
Primary key expression to use during table creation | yes |
|
store_type |
Type of table. Available options are row and column |
no |
row |
auto_partitioning_by_size |
Enable automatic partitioning by size. Available options are ENABLED and DISABLED |
no |
|
auto_partitioning_partition_size_mb |
Partition size in megabytes for automatic partitioning | no |
|
ttl |
Time-to-live (TTL) expression for automatic data expiration | no |
Incremental
| Option | Description | Required | Default |
|---|---|---|---|
incremental_strategy |
Strategy of incremental materialization. Current adapter supports only merge strategy, which will use YDB's UPSERT operation. |
no |
default |
primary_key |
Primary key expression to use during table creation | yes |
|
store_type |
Type of table. Available options are row and column |
no |
row |
auto_partitioning_by_size |
Enable automatic partitioning by size. Available options are ENABLED and DISABLED |
no |
|
auto_partitioning_partition_size_mb |
Partition size in megabytes for automatic partitioning | no |
|
ttl |
Time-to-live (TTL) expression for automatic data expiration | no |
Example table configuration
{{ config(
primary_key='id, created_at',
store_type='row',
auto_partitioning_by_size='ENABLED',
auto_partitioning_partition_size_mb=256,
ttl='Interval("P30D") on created_at'
) }}
select
id,
name,
created_at
from {{ ref('source_table') }}
Seed
| Option | Description | Required | Default |
|---|---|---|---|
primary_key |
Primary key expression to use during table creation | no |
The first column of CSV will be used as default. |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbt_ydb-0.0.13.tar.gz.
File metadata
- Download URL: dbt_ydb-0.0.13.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f2014b621c049ce30d9db44f977a785bb153966951056c9ca7f4a15e899acf3
|
|
| MD5 |
ef0695d1abd32977fea6045292b797c7
|
|
| BLAKE2b-256 |
02e93a1d79c6323a35eb3ab8e9f845e07ca2faacab2739d91708234597c33e47
|
Provenance
The following attestation bundles were made for dbt_ydb-0.0.13.tar.gz:
Publisher:
python-publish.yml on ydb-platform/dbt-ydb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_ydb-0.0.13.tar.gz -
Subject digest:
5f2014b621c049ce30d9db44f977a785bb153966951056c9ca7f4a15e899acf3 - Sigstore transparency entry: 1115368768
- Sigstore integration time:
-
Permalink:
ydb-platform/dbt-ydb@02403b37e386c8216e2536c3502ac0eb9d040487 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ydb-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@02403b37e386c8216e2536c3502ac0eb9d040487 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file dbt_ydb-0.0.13-py3-none-any.whl.
File metadata
- Download URL: dbt_ydb-0.0.13-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59d01066c5b542a06c2c64029134a1d2acc69005b7ee027432b719b9b9456904
|
|
| MD5 |
d292640a1d0278803602ce3318d9790b
|
|
| BLAKE2b-256 |
4072d0326ed7865dfac198958ff566a01b2fb5a7310426715eb5cd62b176c354
|
Provenance
The following attestation bundles were made for dbt_ydb-0.0.13-py3-none-any.whl:
Publisher:
python-publish.yml on ydb-platform/dbt-ydb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_ydb-0.0.13-py3-none-any.whl -
Subject digest:
59d01066c5b542a06c2c64029134a1d2acc69005b7ee027432b719b9b9456904 - Sigstore transparency entry: 1115368820
- Sigstore integration time:
-
Permalink:
ydb-platform/dbt-ydb@02403b37e386c8216e2536c3502ac0eb9d040487 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ydb-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@02403b37e386c8216e2536c3502ac0eb9d040487 -
Trigger Event:
workflow_dispatch
-
Statement type: