Skip to main content

A Meltano utility extension to manage dbt projects.

Project description

dbt-ext

Meltano dbt utility extension

Configuration

Note the new DBT_EXT_TYPE setting, used to indicate what dbt profile should be used, and new default executable of dbt_invoker instead of dbt.

dbt-postgres

plugins:
  utilities:
    - name: dbt-postgres
      label: dbt PostgreSQL extension
      executable: dbt_invoker
      namespace: dbt_ext
      pip_url: dbt-core~=1.1.0 dbt-postgres~=1.1.0 git+https://github.com/meltano/dbt-ext.git@feat/working-dbt-ext
      settings:
      - name: skip_pre_invoke
        kind: boolean
        value: false
        description: Whether to skip pre-invoke hooks which automatically run dbt clean and deps
        env: DBT_EXT_SKIP_PRE_INVOKE
      - name: type
        env: DBT_EXT_TYPE
        value: postgres
      - name: project_dir
        label: Projects Directory
        value: $MELTANO_PROJECT_ROOT/transform
      - name: profiles_dir
        label: Profiles Directory
        value: $MELTANO_PROJECT_ROOT/transform/profiles/postgres
        env: DBT_PROFILES_DIR
        # Postgres connection settings are set via `config:` blocks and mapped to `profiles.yml`
      - name: host
        label: Host
        kind: string
        description: |
          The postgres host to connect to.
      - name: user
        label: User
        kind: string
        description: |
          The user to connect as.
      - name: password
        label: Password
        kind: password
        description: |
          The password to connect with.
      - name: port
        label: Port
        kind: integer
        description: |
          The port to connect to.
      - name: dbname
        label: Database
        aliases: ["database"]
        kind: string
        description: |
          The db to connect to.
      - name: schema
        label: Schema
        kind: string
        description: |
          The schema to use.
      - name: keepalives_idle
        label: Keep Alives Idle
        kind: integer
        description: |
          Seconds between TCP keepalive packets.
      - name: search_path
        label: Search Path
        kind: string
        description: |
          Overrides the default search path.
      - name: role
        label: Role
        kind: string
        description: |
          Role for dbt to assume when executing queries.
      - name: sslmode
        label: SSL Mode
        kind: array
        description: |
          SSL Mode used to connect to the database.
      commands:
        clean:
          args: clean
          description: Delete all folders in the clean-targets list (usually the dbt_modules and target directories.)
        compile:
          args: compile
          description: Generates executable SQL from source model, test, and analysis files. Compiled SQL files are written to the target/ directory.
        deps:
          args: deps
          description: Pull the most recent version of the dependencies listed in packages.yml
        run:
          args: run
          description: Compile SQL and execute against the current target database.
        seed:
          args: seed
          description: Load data from csv files into your data warehouse.
        snapshot:
          args: snapshot
          description: Execute snapshots defined in your project.
        test:
          args: test
          description: Runs tests on data in deployed models.
        freshness:
          args: source freshness
          description: Check the freshness of your source data.
        build:
          args: build
          description: Will run your models, tests, snapshots and seeds in DAG order.
        docs-generate:
          args: docs generate
          description: Generate documentation for your project.
        docs-serve:
          args: docs serve
          description: Serve documentation for your project. Make sure you ran `docs-generate` first.
        debug:
          args: debug
          description: Debug your DBT project and warehouse connection.
        describe:
          args: describe
          executable: dbt_extension
        initialize:
          args: initialize
          executable: dbt_extension

dbt-snowflake

  - name: dbt-snowflake
    label: dbt Snowflake
    executable: dbt_invoker
    namespace: dbt_ext
    pip_url: dbt-core~=1.1.0 dbt-snowflake~=1.1.0 git+https://github.com/meltano/dbt-ext.git@feat/working-dbt-ext
    settings:
    - name: skip_pre_invoke
      kind: boolean
      value: false
      description: Whether to skip pre-invoke hooks which automatically run dbt clean and deps
      env: DBT_EXT_SKIP_PRE_INVOKE
    - name: type
      env: DBT_EXT_TYPE
      value: snowflake
    - name: project_dir
      label: Projects Directory
      value: $MELTANO_PROJECT_ROOT/transform
    - name: profiles_dir
      label: Profiles Directory
      env: DBT_PROFILES_DIR
      value: $MELTANO_PROJECT_ROOT/transform/profiles/snowflake
    - name: account
      label: Account
      kind: string
      description: The snowflake account to connect to.
    - name: user
      label: User
      kind: string
      description: The user to connect as.
    - name: password
      label: Password
      kind: password
      description: The user password to authenticate with.
    - name: role
      label: Role
      kind: string
      description: The user role to assume.
    - name: warehouse
      label: Warehouse
      kind: string
      description: The compute warehouse to use when building models.
    - name: database
      label: Database
      kind: string
      description: The database to create models in.
    - name: schema
      label: Schema
      kind: string
      description: The schema to build models into by default.
    commands:
      clean:
        args: clean
        description: Delete all folders in the clean-targets list (usually the dbt_modules
          and target directories.)
      compile:
        args: compile
        description: Generates executable SQL from source model, test, and analysis files.
          Compiled SQL files are written to the target/ directory.
      deps:
        args: deps
        description: Pull the most recent version of the dependencies listed in packages.yml
      run:
        args: run
        description: Compile SQL and execute against the current target database.
      seed:
        args: seed
        description: Load data from csv files into your data warehouse.
      snapshot:
        args: snapshot
        description: Execute snapshots defined in your project.
      test:
        args: test
        description: Runs tests on data in deployed models.
      freshness:
        args: source freshness
        description: Check the freshness of your source data.
      build:
        args: build
        description: Will run your models, tests, snapshots and seeds in DAG order.
      docs-generate:
        args: docs generate
        description: Generate documentation for your project.
      docs-serve:
        args: docs serve
        description: Serve documentation for your project. Make sure you ran `docs-generate` first.
      debug:
        args: debug
        description: Debug your DBT project and warehouse connection.
      describe:
        args: describe
        executable: dbt_extension
      initialize:
        args: initialize
        executable: dbt_extension

Installation

meltano install utility dbt-postgres
meltano invoke dbt-postgres:initialize
meltano invoke dbt-postgres list
meltano invoke dbt-postgres test

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

meltano_dbt_ext-0.4.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

meltano_dbt_ext-0.4.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file meltano_dbt_ext-0.4.0.tar.gz.

File metadata

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

File hashes

Hashes for meltano_dbt_ext-0.4.0.tar.gz
Algorithm Hash digest
SHA256 da7cec048fd600b4b0f54e5afcddc5e05d8f1e223c9fd22fa9393b2c416bc3b0
MD5 eb315ced133836c56906b3bccf75866b
BLAKE2b-256 fd27735c952a05c045b04457b589427f67037d5ef1a09f3041d1df3b7cb19a50

See more details on using hashes here.

Provenance

The following attestation bundles were made for meltano_dbt_ext-0.4.0.tar.gz:

Publisher: release.yml on meltano/dbt-ext

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

File details

Details for the file meltano_dbt_ext-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meltano_dbt_ext-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8947ee8b816e4be40ed96af39fa63ab2b128217ee93f1de5560544c9e0548d63
MD5 acb68e98c8edfcdf5392f2f9fdeafaea
BLAKE2b-256 4d5fc4db5f5ea5a3ec824aa2f2ddaecd5ba675f4bfd248e443cf800f8ae22070

See more details on using hashes here.

Provenance

The following attestation bundles were made for meltano_dbt_ext-0.4.0-py3-none-any.whl:

Publisher: release.yml on meltano/dbt-ext

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