Skip to main content

DBT adapter for YDB

Project description

dbt logo

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 (merge strategy only)
  • Snapshots

Limitations

  • YDB does not support CTE
  • YDB requires 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 a schema. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_ydb-0.0.11.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_ydb-0.0.11-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file dbt_ydb-0.0.11.tar.gz.

File metadata

  • Download URL: dbt_ydb-0.0.11.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dbt_ydb-0.0.11.tar.gz
Algorithm Hash digest
SHA256 01236b4a9facbd023b3986c44e1b8671b2e955d87da2ae8316076b602ad9d892
MD5 c359538ed37efaa7ab79ed9747625889
BLAKE2b-256 7d6b64fd563fed79da4178a6d89a153d89b6e6d20812333a518c4c9295b94752

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_ydb-0.0.11.tar.gz:

Publisher: python-publish.yml on ydb-platform/dbt-ydb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbt_ydb-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: dbt_ydb-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dbt_ydb-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 9dbf5054f5795916b1bee390d111f4398328982144e56498cf5dfaf281b7c80a
MD5 44a3a4733a9d4653044056e533e39d63
BLAKE2b-256 e6556b30569d3813e39c5fdfa2b3ccff720ac69b4336468fc3396c3d2e45dabc

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_ydb-0.0.11-py3-none-any.whl:

Publisher: python-publish.yml on ydb-platform/dbt-ydb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page