Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
type kwargs to be str -> any and some other fixes
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Apr 9, 2022
commit 19fac9ebd61b40812a51c142ac922aa4ff6f05e4
10 changes: 5 additions & 5 deletions sdk/python/feast/infra/utils/snowflake_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import string
from logging import getLogger
from tempfile import TemporaryDirectory
from typing import Dict, Iterator, List, Optional, Tuple, cast, Any
from typing import Any, Dict, Iterator, List, Optional, Tuple, cast

import pandas as pd
from cryptography.hazmat.backends import default_backend
Expand Down Expand Up @@ -42,8 +42,8 @@ def execute_snowflake_statement(conn: SnowflakeConnection, query) -> SnowflakeCu


def get_snowflake_conn(config, autocommit=True) -> SnowflakeConnection:
if config.type == "snowflake.offline":
config_header = "connections.feast_offline_store"
assert config.type == "snowflake.offline"
config_header = "connections.feast_offline_store"

config_dict = dict(config)

Expand All @@ -68,8 +68,8 @@ def get_snowflake_conn(config, autocommit=True) -> SnowflakeConnection:
else:
kwargs["schema"] = '"PUBLIC"'

#https://docs.snowflake.com/en/user-guide/python-connector-example.html#using-key-pair-authentication-key-pair-rotation
#https://docs.snowflake.com/en/user-guide/key-pair-auth.html#configuring-key-pair-authentication
# https://docs.snowflake.com/en/user-guide/python-connector-example.html#using-key-pair-authentication-key-pair-rotation
# https://docs.snowflake.com/en/user-guide/key-pair-auth.html#configuring-key-pair-authentication
if "private_key" in kwargs:
kwargs["private_key"] = parse_private_key_path(
kwargs["private_key"], kwargs["private_key_passphrase"]
Expand Down