Skip to content
Merged
Changes from all commits
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
fix: Update snowpark materialization messages
Signed-off-by: miles.adkins <miles.adkins@snowflake.com>
  • Loading branch information
sfc-gh-madkins committed Sep 21, 2022
commit 8afffc24c56a9ec201c35cb5e59b45e180e51287
14 changes: 5 additions & 9 deletions sdk/python/feast/infra/materialization/snowflake_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@ def update(
entities_to_delete: Sequence[Entity],
entities_to_keep: Sequence[Entity],
):
click.echo(
f"Deploying materialization functions for {Style.BRIGHT + Fore.GREEN}{project}{Style.RESET_ALL}"
)
click.echo()

stage_context = f'"{self.repo_config.batch_engine.database}"."{self.repo_config.batch_engine.schema_}"'
stage_path = f'{stage_context}."feast_{project}"'
with get_snowflake_conn(self.repo_config.batch_engine) as conn:
Expand All @@ -136,12 +131,13 @@ def update(
# if the stage already exists,
# assumes that the materialization functions have been deployed
if f"feast_{project}" in stage_list["name"].tolist():
click.echo(
f"Materialization functions for {Style.BRIGHT + Fore.GREEN}{project}{Style.RESET_ALL} already exists"
)
click.echo()
return None

click.echo(
f"Deploying materialization functions for {Style.BRIGHT + Fore.GREEN}{project}{Style.RESET_ALL}"
)
click.echo()

query = f"CREATE STAGE {stage_path}"
execute_snowflake_statement(conn, query)

Expand Down