Class DbtCrawler.DbtCrawlerBuilder<C extends DbtCrawler,B extends DbtCrawler.DbtCrawlerBuilder<C,B>>

Enclosing class:
DbtCrawler

public abstract static class DbtCrawler.DbtCrawlerBuilder<C extends DbtCrawler,B extends DbtCrawler.DbtCrawlerBuilder<C,B>> extends AbstractCrawler.AbstractCrawlerBuilder<C,B>
  • Constructor Details

    • DbtCrawlerBuilder

      public DbtCrawlerBuilder()
  • Method Details

    • cloud

      public B cloud(String serviceToken, boolean multiTenant)
      Set up the crawler to extract using dbt Cloud (and its default hostname).
      Parameters:
      serviceToken - token to use to authenticate against dbt
      multiTenant - if true, use a multi-tenant cloud config, otherwise a single-tenant cloud config
      Returns:
      the builder, set up to extract using dbt Cloud
    • cloud

      public B cloud(String hostname, String serviceToken, boolean multiTenant)
      Set up the crawler to extract using dbt Cloud.
      Parameters:
      hostname - of dbt (usually https://cloud.getdbt.com)
      serviceToken - token to use to authenticate against dbt
      multiTenant - if true, use a multi-tenant cloud config, otherwise a single-tenant cloud config
      Returns:
      the builder, set up to extract using dbt Cloud
    • core

      public B core(String s3Bucket, String s3Prefix, String s3Region)
      Set up the crawler to extract using dbt Core files in S3.
      Parameters:
      s3Bucket - S3 bucket containing the dbt Core files
      s3Prefix - prefix within the S3 bucket where the dbt Core files are located
      s3Region - S3 region where the bucket is located
      Returns:
      the builder, set up to extract using dbt Core files in S3
    • enrichMaterializedAssets

      public B enrichMaterializedAssets(boolean enabled)
      Whether to enable the enrichment of materialized SQL assets as part of crawling dbt.
      Parameters:
      enabled - if true, any assets that dbt materializes will also be enriched with details from dbt
      Returns:
      the builder, set up to include or exclude enrichment of materialized assets
    • tags

      public B tags(boolean include)
      Whether to enable dbt tag syncing as part of crawling dbt.
      Parameters:
      include - if true, tags in dbt will be included while crawling dbt
      Returns:
      the builder, set to include or exclude dbt tags
    • limitToConnection

      public B limitToConnection(String connectionQualifiedName)
      Limit the crawling to a single connection's assets. (If not specified, crawling will be attempted across all connection's assets.)
      Parameters:
      connectionQualifiedName - unique name of the connection for whose assets to limit crawling
      Returns:
      the builder, set to limit crawling to only those assets in the specified connection
    • include

      public B include(String filter)
      Defines the filter for assets to include when crawling.
      Parameters:
      filter - for dbt Core provide a wildcard expression and for dbt Cloud provide a string-encoded map
      Returns:
      the builder, set to include only those assets specified
    • exclude

      public B exclude(String filter)
      Defines the filter for assets to exclude when crawling.
      Parameters:
      filter - for dbt Core provide a wildcard expression and for dbt Cloud provide a string-encoded map
      Returns:
      the builder, set to exclude only those assets specified
    • metadata

      protected B metadata()
      Set all the metadata for the package (labels, annotations, etc).
      Specified by:
      metadata in class AbstractPackage.AbstractPackageBuilder<C extends DbtCrawler,B extends DbtCrawler.DbtCrawlerBuilder<C,B>>
      Returns:
      the builder, with metadata set
    • $fillValuesFrom

      protected B $fillValuesFrom(C instance)
      Overrides:
      $fillValuesFrom in class AbstractCrawler.AbstractCrawlerBuilder<C extends DbtCrawler,B extends DbtCrawler.DbtCrawlerBuilder<C,B>>
    • self

      protected abstract B self()
      Specified by:
      self in class AbstractCrawler.AbstractCrawlerBuilder<C extends DbtCrawler,B extends DbtCrawler.DbtCrawlerBuilder<C,B>>
    • build

      public abstract C build()
      Specified by:
      build in class AbstractCrawler.AbstractCrawlerBuilder<C extends DbtCrawler,B extends DbtCrawler.DbtCrawlerBuilder<C,B>>
    • toString

      public String toString()
      Overrides:
      toString in class AbstractCrawler.AbstractCrawlerBuilder<C extends DbtCrawler,B extends DbtCrawler.DbtCrawlerBuilder<C,B>>