Class SnowflakeCrawler.SnowflakeCrawlerBuilder<C extends SnowflakeCrawler,B extends SnowflakeCrawler.SnowflakeCrawlerBuilder<C,B>>

Enclosing class:
SnowflakeCrawler

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

    • SnowflakeCrawlerBuilder

      public SnowflakeCrawlerBuilder()
  • Method Details

    • basicAuth

      public B basicAuth(String username, String password, String role, String warehouse)
      Set up the crawler to use basic authentication.
      Parameters:
      username - through which to access Snowflake
      password - through which to access Snowflake
      role - name of the role within Snowflake to crawl through
      warehouse - name of the warehouse within Snowflake to crawl through
      Returns:
      the builder, set up to use basic authentication
    • keypairAuth

      public B keypairAuth(String username, String privateKey, String privateKeyPassword, String role, String warehouse)
      Set up the crawler to use keypair-based authentication.
      Parameters:
      username - through which to access Snowflake
      privateKey - encrypted private key to for authenticating with Snowflake
      privateKeyPassword - password for the encrypted private key
      role - name of the role within Snowflake to crawl through
      warehouse - name of the warehouse within Snowflake to crawl through
      Returns:
      the builder, set up to use keypair-based authentication
    • informationSchema

      public B informationSchema(String hostname)
      Set the crawler to extract using Snowflake's information schema.
      Parameters:
      hostname - of the Snowflake instance
      Returns:
      the builder, set to extract using information schema
    • accountUsage

      public B accountUsage(String hostname, String databaseName, String schemaName)
      Set the crawler to extract using Snowflake's account usage database and schema.
      Parameters:
      hostname - of the Snowflake instance
      databaseName - name of the database to use
      schemaName - name of the schema to use
      Returns:
      the builder, set to extract using account usage
    • lineage

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

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

      public B include(Map<String,List<String>> assets) throws InvalidRequestException
      Defines the filter for assets to include when crawling.
      Parameters:
      assets - map keyed by database name with each value being a list of schemas
      Returns:
      the builder, set to include only those assets specified
      Throws:
      InvalidRequestException - in the unlikely event the provided filter cannot be translated
    • exclude

      public B exclude(Map<String,List<String>> assets) throws InvalidRequestException
      Defines the filter for assets to exclude when crawling.
      Parameters:
      assets - map keyed by database name with each value being a list of schemas
      Returns:
      the builder, set to exclude only those assets specified
      Throws:
      InvalidRequestException - in the unlikely event the provided filter cannot be translated
    • exclude

      public B exclude(String regex)
      Defines a regular expression to use for excluding assets when crawling.
      Parameters:
      regex - any asset names that match this regular expression will be excluded from crawling
      Returns:
      the builder, set to exclude any assets that match the provided regular expression
    • metadata

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

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

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

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

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