Skip to content

Commit

Permalink
fix: Update snowflake materialization messages (feast-dev#3230)
Browse files Browse the repository at this point in the history
Signed-off-by: miles.adkins <[email protected]>

Signed-off-by: miles.adkins <[email protected]>
  • Loading branch information
sfc-gh-madkins authored Sep 21, 2022
1 parent 769c318 commit a63d440
Showing 1 changed file with 5 additions and 9 deletions.
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

0 comments on commit a63d440

Please sign in to comment.