Skip to content

Commit

Permalink
Merge pull request #44 from sfc-gh-chammond/patch-1
Browse files Browse the repository at this point in the history
Add tags to table for tracking
  • Loading branch information
iamontheinet authored Oct 10, 2024
2 parents 086c1db + 05427b3 commit 5946805
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions steps/02_load_raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def load_raw_table(session, tname=None, s3dir=None, year=None, schema=None):
df = session.read.option("compression", "snappy") \
.parquet(location)
df.copy_into_table("{}".format(tname))
comment_text = '''{"origin":"sf_sit-is","name":"snowpark_101_de","version":{"major":1, "minor":0},"attributes":{"is_quickstart":1, "source":"sql"}}'''
sql_command = f"""COMMENT ON TABLE {tname} IS '{comment_text}';"""
session.sql(sql_command).collect()

# SNOWFLAKE ADVANTAGE: Warehouse elasticity (dynamic scaling)

Expand Down

0 comments on commit 5946805

Please sign in to comment.