Skip to content

Commit

Permalink
Adds a few more SQL commands for snowflake example
Browse files Browse the repository at this point in the history
Also fixes typo.
  • Loading branch information
skrawcz committed Dec 17, 2024
1 parent c3183cc commit 9f6ea84
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/snowflake/hamilton_ui/pipeline_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def get_response(prj_id, spend, signups, output_columns):
tags={"environment": "R&D", "team": "MY_TEAM", "version": "Beta"},
)
input_columns = {
"signups": pd.Series(spend),
"spend": pd.Series(signups),
"signups": pd.Series(signups),
"spend": pd.Series(spend),
}
dr = (
driver.Builder()
Expand Down
11 changes: 10 additions & 1 deletion examples/snowflake/hamilton_ui/snowflake.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
-- For more details visit:
-- https://medium.com/@pkantyka/observability-of-python-code-and-application-logic-with-hamilton-ui-on-snowflake-container-services-a26693b46635

CREATE OR REPLACE IMAGE REPOSITORY images;
-- then docker build -t <repository_url>/snowflake-hamilton-ui .
-- docker login <registry_hostname> -u <snowflake-username>
-- docker push <repository_url>/snowflake-hamilton-ui
SHOW IMAGES IN IMAGE REPOSITORY <name>;

CREATE STAGE hamilton_base ENCRYPTION = (type = 'SNOWFLAKE_SSE');


CREATE SERVICE public.hamilton_ui
IN COMPUTE POOL TEST_POOL
FROM SPECIFICATION $$
Expand All @@ -21,7 +30,7 @@ spec:
- name: hamilton-basedir
source: "@<db-name>.<schema-name>.hamilton_base"
$$
QUERY_WAREHOUSE = <warehause-name>
QUERY_WAREHOUSE = <warehouse-name>
;

CALL SYSTEM$GET_SERVICE_STATUS('<db-name>.<schema>.hamilton_ui');
Expand Down

0 comments on commit 9f6ea84

Please sign in to comment.