-
Notifications
You must be signed in to change notification settings - Fork 301
Snowflake integration #722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Experiment ResultsExperiment 1: air-passengersDescription:
Results:
Plot:Experiment 2: air-passengersDescription:
Results:
Plot:Experiment 3: electricity-multiple-seriesDescription:
Results:
Plot:Experiment 4: electricity-multiple-seriesDescription:
Results:
Plot:Experiment 5: electricity-multiple-seriesDescription:
Results:
Plot: |
| MOD(HASH(unique_id), :MAX_BATCHES) AS gp, | ||
| unique_id, | ||
| ds, | ||
| OBJECT_CONSTRUCT_KEEP_NULL(*) AS data_obj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OBJECT_CONSTRUCT_KEEP_NULL is used here to handle the case when the historical exog variable has null value. Previous implementation:
| (SELECT MOD(HASH(unique_id), :MAX_BATCHES) AS gp, unique_id, ds, y, object_construct(*) AS obj FROM TABLE(:INPUT_DATA)) a, |
| ╔══════════════════════════════════════════════════════════════════════════════╗ | ||
| ║ 🎉 Ready to start forecasting! ║ | ||
| ╚══════════════════════════════════════════════════════════════════════════════╝ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sample scripts are generated to show user how to call the stored procedures using the generated sample tables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to know that your demo video replicates the earlier behavior, a good start!
Makefile
Outdated
|
|
||
| format: | ||
| @echo "Running black formatter on staged files..." | ||
| @git diff --cached --name-only --diff-filter=ACMR | grep '\.py$$' | xargs -r uv run black |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Deployment execution command like
python -m nixtla.scripts.snowflake_install_nixtla can be registered as part of Makefile command.
| CREATE OR REPLACE NETWORK RULE {ds_prefix}nixtla_network_rule | ||
| MODE = EGRESS | ||
| TYPE = HOST_PORT | ||
| VALUE_LIST = ('api.nixtla.io'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please help to make this an option that user can customize the domain name, in case we want to use a value other than 'api.nixtla.io'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
| ``` | ||
| """ | ||
|
|
||
| PACKAGES = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest that the essential packages can be read from the pyproject.toml and on top of that, we add the additional snowflake required dependencies.
The objective is that if Nixtla client has newly introduced dependency, we can automatically consider them than updating this manually for snowflake integration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exactly the thing that didn't work in snowflake. Snowflake running environment is extremely picky on libraries, it doesn't support many of them, so we have to carefully pick the ones. I spent the most time to figure out this list when I worked on this. But @gee-senbong feel free to try what @JQGoh suggests. Maybe it's much easier to work with now.
Makefile
Outdated
|
|
||
| format: | ||
| @echo "Running black formatter on staged files..." | ||
| @git diff --cached --name-only --diff-filter=ACMR | grep '\.py$$' | xargs -r uv run black |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should move to uv format but these two new commands are good to add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update this to use uv format.
af579ec to
245981b
Compare





This PR revises previous PR (#648) to add snowflake integration support.
Command to trigger the script to install Snowflake stored procedure: