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.

Installation

To install plugin, execute the following command:

pip install dbt-ydb

Supported features

  • Table materialization
  • View materialization
  • Seeds
  • Docs generate
  • Tests
  • Incremental materializations
  • 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.

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
Example table configuration
{{ config(
    primary_key='id, created_at',
    store_type='column',
    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.5.tar.gz (14.1 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.5-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbt_ydb-0.0.5.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.11

File hashes

Hashes for dbt_ydb-0.0.5.tar.gz
Algorithm Hash digest
SHA256 82a651b25a8d35d71d16f2792066bfc919344d8c9d7ad5b8721e8c213a59eb48
MD5 39a6ecdd1d5fdf3c777e30bbdc740cd5
BLAKE2b-256 951e01f17629c258e85b64cb6e331cb0e0689417855e39bed3f7f2aaa2d9c210

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt_ydb-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.11

File hashes

Hashes for dbt_ydb-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b30fe7f00aa6530713cca28c2a677728a32b0962ef58cbc38c01d32cbb6bdd2e
MD5 ac3543310299bec43d115ca06a4928f2
BLAKE2b-256 809337ec866159a9a4ea0b4600a71ab294940c4a95f32c14db7e3043e264c838

See more details on using hashes here.

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