Skip to content

Commit

Permalink
fix: Snowflake config file search error (#3193)
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Adkins <miles.adkins@snowflake.com>

Signed-off-by: Miles Adkins <miles.adkins@snowflake.com>
  • Loading branch information
sfc-gh-madkins committed Sep 8, 2022
1 parent 11a0e1a commit 189afb9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
5 changes: 1 addition & 4 deletions sdk/python/feast/infra/materialization/snowflake_engine.py
Expand Up @@ -2,7 +2,6 @@
import shutil
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
from typing import Callable, List, Literal, Optional, Sequence, Union

import click
Expand Down Expand Up @@ -45,9 +44,7 @@ class SnowflakeMaterializationEngineConfig(FeastConfigBaseModel):
type: Literal["snowflake.engine"] = "snowflake.engine"
""" Type selector"""

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

account: Optional[str] = None
Expand Down
4 changes: 1 addition & 3 deletions sdk/python/feast/infra/offline_stores/snowflake.py
Expand Up @@ -64,9 +64,7 @@ class SnowflakeOfflineStoreConfig(FeastConfigBaseModel):
type: Literal["snowflake.offline"] = "snowflake.offline"
""" Offline store type selector"""

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

account: Optional[str] = None
Expand Down
5 changes: 1 addition & 4 deletions sdk/python/feast/infra/online_stores/snowflake.py
Expand Up @@ -2,7 +2,6 @@
import os
from binascii import hexlify
from datetime import datetime
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple

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

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

account: Optional[str] = None
Expand Down

0 comments on commit 189afb9

Please sign in to comment.