diff --git a/ads/features/feature_tables/ad_embeddings.py b/ads/features/feature_tables/ad_embeddings.py index 211abad..395a198 100644 --- a/ads/features/feature_tables/ad_embeddings.py +++ b/ads/features/feature_tables/ad_embeddings.py @@ -1,8 +1,9 @@ from tecton.types import Field, String, Timestamp, Array, Float64 -from tecton import Entity, FeatureTable, DeltaConfig -from ads.entities import ad +from tecton import Entity, FeatureTable from datetime import timedelta +ad = Entity(name='ad_embeddings_entity', join_keys=["ad_id"]) + schema = [ Field('ad_id', String), Field('timestamp', Timestamp), diff --git a/ads/features/stream_features/content_keyword_clicks_push.py b/ads/features/stream_features/content_keyword_clicks_push.py index 69c8d7f..2ad6946 100644 --- a/ads/features/stream_features/content_keyword_clicks_push.py +++ b/ads/features/stream_features/content_keyword_clicks_push.py @@ -1,5 +1,5 @@ from datetime import timedelta, datetime -from tecton import StreamFeatureView, FilteredSource +from tecton import StreamFeatureView, FilteredSource, BatchTriggerType from ads.entities import content_keyword from ads.data_sources.ad_impressions import keyword_click_source @@ -19,5 +19,6 @@ ttl=timedelta(days=30), tags={'release': 'production'}, owner='demo-user@tecton.ai', - description='The ad clicks for a content keyword' + description='The ad clicks for a content keyword', + batch_trigger=BatchTriggerType.MANUAL ) diff --git a/repo.yaml b/repo.yaml new file mode 100644 index 0000000..eabe9e1 --- /dev/null +++ b/repo.yaml @@ -0,0 +1,58 @@ +# This is the Tecton repo config. It's used to configure how Tecton builds and applies your +# feature definitions during `tecton plan/apply/test`. +# +# By default, the Tecton CLI will use the Repo Config specified at /repo.yaml, but you +# can specify another file by using `tecton plan --config my_config.yaml`. + +# The `defaults` keyword specifies default parameter values for Tecton objects defined in your Feature Repository. +# For example, you can set a default `tecton_materialization_runtime` for all Batch Feature Views. +# Defaults can be overridden on a per-object basis in your Python feature definitions. +# See Tecton's documentation for details on which Tecton objects are currently supported by the `defaults` keyword. + +defaults: + batch_feature_view: + tecton_materialization_runtime: 0.9.0 + environment: tecton-rift-core-0.9.0 # For Rift-based Batch Feature Views + stream_feature_view: + tecton_materialization_runtime: 0.9.0 + environment: tecton-rift-core-0.9.0 # For Rift-based Stream Feature Views + feature_table: + tecton_materialization_runtime: 0.9.0 + +# Below is an example of other defaults that can be set using the `defaults` keyword. +# defaults: +# batch_feature_view: +# tecton_materialization_runtime: 0.9.0 +# online_store: +# kind: RedisConfig +# offline_store: +# kind: OfflineStoreConfig +# staging_table_format: +# kind: ParquetConfig +# batch_compute: +# kind: DatabricksClusterConfig +# instance_type: m5.xlarge +# number_of_workers: 2 +# extra_pip_dependencies: +# - haversine==2.8.0 +# stream_feature_view: +# tecton_materialization_runtime: 0.9.0 +# stream_compute: +# kind: DatabricksClusterConfig +# instance_availability: on_demand +# instance_type: m5.2xlarge +# number_of_workers: 4 +# offline_store: +# kind: OfflineStoreConfig +# staging_table_format: +# kind: ParquetConfig +# feature_table: +# tecton_materialization_runtime: 0.9.0 +# batch_compute: +# kind: DatabricksClusterConfig +# instance_type: m5.xlarge +# number_of_workers: 2 +# online_store: +# kind: RedisConfig +# feature_service: +# on_demand_environment: tecton-python-extended:0.4