tecton.declarative.BatchSource

class tecton.declarative.BatchSource(*, name, description=None, tags=None, owner=None, batch_config)

Declare a BatchSource, used to read batch data into Tecton.

BatchFeatureViews ingest data from a BatchSource.

Methods

__init__

Creates a new BatchSource

__init__(*, name, description=None, tags=None, owner=None, batch_config)

Creates a new BatchSource

Parameters
  • name (str) – An unique name of the DataSource.

  • description (Optional[str]) – A human readable description.

  • tags (Optional[Dict[str, str]]) – Tags associated with this Tecton Object (key-value pairs of arbitrary metadata).

  • owner (Optional[str]) – Owner name (typically the email of the primary maintainer).

  • batch_config (Union[FileConfig, HiveConfig, RedshiftConfig, SnowflakeConfig, SparkBatchConfig]) – BatchConfig object containing the configuration of the batch data source to be included in this DataSource.

Returns

A BatchSource class instance.

Example of a BatchSource declaration:

# Declare a BatchSource with HiveConfig instance as its batch_config parameter
# Refer to Configs API documentation other batch_config types.
from tecton import HiveConfig, BatchSource

credit_scores_batch = BatchSource(
    name='credit_scores_batch',
    batch_config=HiveConfig(
        database='demo_fraud',
        table='credit_scores',
        timestamp_field='timestamp'
    ),
    owner='matt@tecton.ai',
    tags={'release': 'production'}
)

Attributes

name

The name of this DataSource.

timestamp_field

The name of the timestamp column or key of this DataSource.