Skip to content

Commit

Permalink
update sample repo so that it can be successfully applied for 0.9"
Browse files Browse the repository at this point in the history
  • Loading branch information
lilly-tecton committed Sep 3, 2024
1 parent bbc7636 commit 63bd5a0
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 4 deletions.
5 changes: 3 additions & 2 deletions ads/features/feature_tables/ad_embeddings.py
Original file line number Diff line number Diff line change
@@ -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),
Expand Down
5 changes: 3 additions & 2 deletions ads/features/stream_features/content_keyword_clicks_push.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -19,5 +19,6 @@
ttl=timedelta(days=30),
tags={'release': 'production'},
owner='[email protected]',
description='The ad clicks for a content keyword'
description='The ad clicks for a content keyword',
batch_trigger=BatchTriggerType.MANUAL
)
58 changes: 58 additions & 0 deletions repo.yaml
Original file line number Diff line number Diff line change
@@ -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 <TECTON_REPO_ROOT>/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

0 comments on commit 63bd5a0

Please sign in to comment.