Skip to content

Commit 189afb9

Browse files
fix: Snowflake config file search error (#3193)
Signed-off-by: Miles Adkins <[email protected]> Signed-off-by: Miles Adkins <[email protected]>
1 parent 11a0e1a commit 189afb9

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

sdk/python/feast/infra/materialization/snowflake_engine.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import shutil
33
from dataclasses import dataclass
44
from datetime import datetime
5-
from pathlib import Path
65
from typing import Callable, List, Literal, Optional, Sequence, Union
76

87
import click
@@ -45,9 +44,7 @@ class SnowflakeMaterializationEngineConfig(FeastConfigBaseModel):
4544
type: Literal["snowflake.engine"] = "snowflake.engine"
4645
""" Type selector"""
4746

48-
config_path: Optional[str] = (
49-
Path(os.environ["HOME"]) / ".snowsql/config"
50-
).__str__()
47+
config_path: Optional[str] = os.path.expanduser("~/.snowsql/config")
5148
""" Snowflake config path -- absolute path required (Cant use ~)"""
5249

5350
account: Optional[str] = None

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ class SnowflakeOfflineStoreConfig(FeastConfigBaseModel):
6464
type: Literal["snowflake.offline"] = "snowflake.offline"
6565
""" Offline store type selector"""
6666

67-
config_path: Optional[str] = (
68-
Path(os.environ["HOME"]) / ".snowsql/config"
69-
).__str__()
67+
config_path: Optional[str] = os.path.expanduser("~/.snowsql/config")
7068
""" Snowflake config path -- absolute path required (Cant use ~)"""
7169

7270
account: Optional[str] = None

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
from binascii import hexlify
44
from datetime import datetime
5-
from pathlib import Path
65
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
76

87
import pandas as pd
@@ -31,9 +30,7 @@ class SnowflakeOnlineStoreConfig(FeastConfigBaseModel):
3130
type: Literal["snowflake.online"] = "snowflake.online"
3231
""" Online store type selector"""
3332

34-
config_path: Optional[str] = (
35-
Path(os.environ["HOME"]) / ".snowsql/config"
36-
).__str__()
33+
config_path: Optional[str] = os.path.expanduser("~/.snowsql/config")
3734
""" Snowflake config path -- absolute path required (Can't use ~)"""
3835

3936
account: Optional[str] = None

0 commit comments

Comments
 (0)