Skip to content

Commit f4c7243

Browse files
fix: Remove snowflake source warehouse tech debt
Signed-off-by: miles.adkins <miles.adkins@snowflake.com>
1 parent 4f9ad7e commit f4c7243

File tree

5 files changed

+0
-26
lines changed

5 files changed

+0
-26
lines changed

protos/feast/core/DataSource.proto

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,6 @@ message DataSource {
209209

210210
// Snowflake schema name
211211
string database = 4;
212-
213-
// Snowflake warehouse name
214-
string warehouse = 5;
215212
}
216213

217214
// Defines options for DataSource that sources features from a spark table/query

sdk/python/feast/infra/offline_stores/snowflake.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ def pull_latest_from_table_or_query(
152152
+ '"'
153153
)
154154

155-
if data_source.snowflake_options.warehouse:
156-
config.offline_store.warehouse = data_source.snowflake_options.warehouse
157-
158155
snowflake_conn = get_snowflake_conn(config.offline_store)
159156

160157
start_date = start_date.astimezone(tz=utc)
@@ -205,9 +202,6 @@ def pull_all_from_table_or_query(
205202
+ '"'
206203
)
207204

208-
if data_source.snowflake_options.warehouse:
209-
config.offline_store.warehouse = data_source.snowflake_options.warehouse
210-
211205
snowflake_conn = get_snowflake_conn(config.offline_store)
212206

213207
start_date = start_date.astimezone(tz=utc)

sdk/python/feast/infra/offline_stores/snowflake_source.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def __init__(
2626
name: Optional[str] = None,
2727
timestamp_field: Optional[str] = "",
2828
database: Optional[str] = None,
29-
warehouse: Optional[str] = None,
3029
schema: Optional[str] = None,
3130
table: Optional[str] = None,
3231
query: Optional[str] = None,
@@ -45,7 +44,6 @@ def __init__(
4544
timestamp_field (optional): Event timestamp field used for point in time
4645
joins of feature values.
4746
database (optional): Snowflake database where the features are stored.
48-
warehouse (optional): Snowflake warehouse where the database is stored.
4947
schema (optional): Snowflake schema in which the table is located.
5048
table (optional): Snowflake table where the features are stored. Exactly one of 'table'
5149
and 'query' must be specified.
@@ -73,7 +71,6 @@ def __init__(
7371
schema=_schema,
7472
table=table,
7573
query=query,
76-
warehouse=warehouse,
7774
)
7875

7976
# If no name, use the table as the default name.
@@ -109,7 +106,6 @@ def from_proto(data_source: DataSourceProto):
109106
database=data_source.snowflake_options.database,
110107
schema=data_source.snowflake_options.schema,
111108
table=data_source.snowflake_options.table,
112-
warehouse=data_source.snowflake_options.warehouse,
113109
created_timestamp_column=data_source.created_timestamp_column,
114110
field_mapping=dict(data_source.field_mapping),
115111
query=data_source.snowflake_options.query,
@@ -134,7 +130,6 @@ def __eq__(self, other):
134130
and self.schema == other.schema
135131
and self.table == other.table
136132
and self.query == other.query
137-
and self.warehouse == other.warehouse
138133
)
139134

140135
@property
@@ -157,11 +152,6 @@ def query(self):
157152
"""Returns the snowflake options of this snowflake source."""
158153
return self.snowflake_options.query
159154

160-
@property
161-
def warehouse(self):
162-
"""Returns the warehouse of this snowflake source."""
163-
return self.snowflake_options.warehouse
164-
165155
def to_proto(self) -> DataSourceProto:
166156
"""
167157
Converts a SnowflakeSource object to its protobuf representation.
@@ -335,13 +325,11 @@ def __init__(
335325
schema: Optional[str],
336326
table: Optional[str],
337327
query: Optional[str],
338-
warehouse: Optional[str],
339328
):
340329
self.database = database or ""
341330
self.schema = schema or ""
342331
self.table = table or ""
343332
self.query = query or ""
344-
self.warehouse = warehouse or ""
345333

346334
@classmethod
347335
def from_proto(cls, snowflake_options_proto: DataSourceProto.SnowflakeOptions):
@@ -359,7 +347,6 @@ def from_proto(cls, snowflake_options_proto: DataSourceProto.SnowflakeOptions):
359347
schema=snowflake_options_proto.schema,
360348
table=snowflake_options_proto.table,
361349
query=snowflake_options_proto.query,
362-
warehouse=snowflake_options_proto.warehouse,
363350
)
364351

365352
return snowflake_options
@@ -376,7 +363,6 @@ def to_proto(self) -> DataSourceProto.SnowflakeOptions:
376363
schema=self.schema,
377364
table=self.table,
378365
query=self.query,
379-
warehouse=self.warehouse,
380366
)
381367

382368
return snowflake_options_proto
@@ -393,7 +379,6 @@ def __init__(self, table_ref: str):
393379
schema=None,
394380
table=table_ref,
395381
query=None,
396-
warehouse=None,
397382
)
398383

399384
@staticmethod

sdk/python/tests/integration/feature_repos/universal/data_sources/snowflake.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def create_data_source(
6767
timestamp_field=timestamp_field,
6868
created_timestamp_column=created_timestamp_column,
6969
field_mapping=field_mapping or {"ts_1": "ts"},
70-
warehouse=self.offline_store_config.warehouse,
7170
)
7271

7372
def create_saved_dataset_destination(self) -> SavedDatasetSnowflakeStorage:

sdk/python/tests/unit/test_data_sources.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ def test_proto_conversion():
118118
snowflake_source = SnowflakeSource(
119119
name="test_source",
120120
database="test_database",
121-
warehouse="test_warehouse",
122121
schema="test_schema",
123122
table="test_table",
124123
timestamp_field="event_timestamp",

0 commit comments

Comments
 (0)