Class SnowflakeMiner.SnowflakeMinerBuilder<C extends SnowflakeMiner,B extends SnowflakeMiner.SnowflakeMinerBuilder<C,B>>

Enclosing class:
SnowflakeMiner

public abstract static class SnowflakeMiner.SnowflakeMinerBuilder<C extends SnowflakeMiner,B extends SnowflakeMiner.SnowflakeMinerBuilder<C,B>> extends AbstractMiner.AbstractMinerBuilder<C,B>
  • Constructor Details

    • SnowflakeMinerBuilder

      public SnowflakeMinerBuilder()
  • Method Details

    • direct

      public B direct(long startEpoch)
      Set up the miner to extract directly from Snowflake, using the default database.
      Parameters:
      startEpoch - date and time from which to start mining, as an epoch
      Returns:
      the builder, set up to extract directly from Snowflake using the default database
    • direct

      public B direct(String database, String schema, long startEpoch)
      Set up the miner to extract directly from Snowflake, using a cloned database.
      Parameters:
      database - name of the database to extract from
      schema - name of the schema to extract from
      startEpoch - date and time from which to start mining, as an epoch
      Returns:
      the builder, set up to extract directly from Snowflake using a cloned database
    • s3

      public B s3(String s3Bucket, String s3Prefix, String queryKey, String defaultDatabase, String defaultSchema, String sessionId)
      Set up the miner to extract from S3 (using JSON line-separated files).
      Parameters:
      s3Bucket - S3 bucket where the JSON line-separated files are located
      s3Prefix - prefix within the S3 bucket in which the JSON line-separated files are located
      queryKey - JSON key containing the query definition
      defaultDatabase - JSON key containing the default database name to use if a query is not qualified with database name
      defaultSchema - JSON key containing the default schema name to use if a query is not qualified with schema name
      sessionId - JSON key containing the session ID of the SQL query
      Returns:
      the builder, set up to extract from a set of JSON line-separated files in S3
    • excludeUsers

      public B excludeUsers(List<String> users) throws InvalidRequestException
      Defines users who should be excluded when calculating usage metrics for assets (for example, system accounts).
      Parameters:
      users - list of users to exclude when calculating usage metrics
      Returns:
      the builder, set to exclude the specified users from usage metrics
      Throws:
      InvalidRequestException - in the unlikely event the provided list cannot be translated
    • nativeLineage

      public B nativeLineage(boolean enabled)
      Whether to enable native lineage from Snowflake, using Snowflake's ACCESS_HISTORY.OBJECTS_MODIFIED Column. Note: this is only available only for Snowflake Enterprise customers.
      Parameters:
      enabled - if true, native lineage from Snowflake will be used for crawling
      Returns:
      the builder, set to include / exclude native lineage from Snowflake
    • metadata

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

      protected B $fillValuesFrom(C instance)
      Overrides:
      $fillValuesFrom in class AbstractMiner.AbstractMinerBuilder<C extends SnowflakeMiner,B extends SnowflakeMiner.SnowflakeMinerBuilder<C,B>>
    • self

      protected abstract B self()
      Specified by:
      self in class AbstractMiner.AbstractMinerBuilder<C extends SnowflakeMiner,B extends SnowflakeMiner.SnowflakeMinerBuilder<C,B>>
    • build

      public abstract C build()
      Specified by:
      build in class AbstractMiner.AbstractMinerBuilder<C extends SnowflakeMiner,B extends SnowflakeMiner.SnowflakeMinerBuilder<C,B>>
    • toString

      public String toString()
      Overrides:
      toString in class AbstractMiner.AbstractMinerBuilder<C extends SnowflakeMiner,B extends SnowflakeMiner.SnowflakeMinerBuilder<C,B>>