forked from feathr-ai/feathr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate out snowflake source (feathr-ai#836)
* Add more secret manager support * Add abstract class * Update feathr-configuration-and-env.md * Update _envvariableutil.py * add tests for aws secrets manager * Update test_secrets_read.py * fix tests * Update test_secrets_read.py * fix test * Update pull_request_push_test.yml * get_secrets_update * move import statement * update spelling * update raise exception * revert * feature registry hack * query for uppercase * add snowflake source * remove snowflake type * enableDebugLogger * add logging * simple path snowflake fix * snowflake-update * fix bugs/log * get_snowflake_path * update get_snowflake_path * remove log * log * add logs * test with path * update snowflake registry handling * update source * remove logs * update error handling and test * make lowercase * remove logging * Revert "Merge pull request #5 from aabbasi-hbo/secrets-key-test" This reverts commit 41554b4, reversing changes made to 6b401de. * Revert "remove logging" This reverts commit e01635d. * Revert "update error handling and test" This reverts commit e5c200f. * Revert "query for uppercase" This reverts commit 0531788. * Revert "revert" This reverts commit 87cd083. * Revert "update raise exception" This reverts commit 44a3ce0. * Revert "update spelling" This reverts commit 07a8cf0. * Revert "move import statement" This reverts commit 218123f. * Revert "get_secrets_update" This reverts commit 9cb332c. * Revert "Update pull_request_push_test.yml" This reverts commit e617b99. * Revert "fix test" This reverts commit 8be6a42. * Revert "Update test_secrets_read.py" This reverts commit 997a2b1. * Revert "fix tests" This reverts commit a6870d9. * Revert "Update test_secrets_read.py" This reverts commit aa5fdda. * Revert "add tests for aws secrets manager" This reverts commit cdcd612. * Revert "Update _envvariableutil.py" This reverts commit f616522. * Revert "Update feathr-configuration-and-env.md" This reverts commit 2d6c135. * Revert "Add abstract class" This reverts commit e96459a. * Revert "Add more secret manager support" This reverts commit c31906c. * remove extra line * fix formatting * Update setup.py * update python tests * update scala test * update tests * update test * add test * update docs * fix test * add snowflake guide * add to NonTimeBasedDataSourceAccessor * remove registry fixes * Update source.py * Update source.py * Update source.py * remove print * Update feathr-snowflake-guide.md Co-authored-by: Xiaoyong Zhu <[email protected]>
- Loading branch information
1 parent
26c14b4
commit c21d89d
Showing
35 changed files
with
501 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
layout: default | ||
title: Using Snowflake with Feathr | ||
parent: Feathr How-to Guides | ||
--- | ||
|
||
# Using Snowflake with Feathr | ||
|
||
Currently, feathr supports using Snowflake as a source. | ||
|
||
# Using Snowflake as a source | ||
|
||
To use Snowflake as a source, we need to create a `SnowflakeSource` in projects. | ||
|
||
``` | ||
source = feathr.SnowflakeSource(name: str, database: str, schema: str, dbtable: optional[str], query: Optional[str]) | ||
``` | ||
|
||
* `name` is the source name, same as other sources. | ||
* `database` is SF database that stores the table of interest | ||
* `schema` is SF schema that stores the table of interest | ||
* `dbtable` or `query`, `dbtable` is the table name in the database and `query` is a SQL `SELECT` statement, only one of them should be specified at the same time. | ||
|
||
For more information on how Snowflake uses Databases and Schemas to organize data, please refer to [Snowflake Datatabase and Schema](https://docs.snowflake.com/en/sql-reference/ddl-database.html) | ||
|
||
There are some other parameters such as `preprocessing`, they're same as other sources like `HdfsSource`. | ||
|
||
After creating the `SnowflakeSource`, you can use it in the same way as other kinds of sources. | ||
|
||
# Specifying Snowflake Source in Observation Settings | ||
|
||
`ObservationSettings` requires an observation path. In order to generate the snowflake path, feathr exposes client functionality that exposes the same arguments as SnowflakeSource. | ||
|
||
To generate snowflake path to pass into `ObservationSettings`, we need to call `client.get_snowflake_path()` functionality. | ||
|
||
``` | ||
observation_path = client.get_snowflake_path(database: str, schema: str, dbtable: Optional[str], query: Optional[str]) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.