-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Allow extra fields in Snowflake connections #5419
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
feat: Allow extra fields in Snowflake connections #5419
Conversation
701e28c
to
8e2a45b
Compare
Signed-off-by: michael neely <141048027+michaelneely@users.noreply.github.com>
8e2a45b
to
fb8f10b
Compare
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 rather add config params explicitly because explicit fields are validated by Pydantic, catching typos, wrong data types, or misconfigurations early.
This also allows users to identify what fields are available for configuring the stores pre-hand.
Usability and Maintainability Comments ^
There are a lot of configuration options (see here). I think trying to maintain parity for dozens of options would be a difficult endeavour. Users could easily refer to the Snowflake connector documentation for any parameters considered non-standard. |
Could we choose between those are regular in use (So we can add explicit) and those are irregular(comes in with |
I think the parameters already explicitly listed in the Snowflake models are considered the "standard" options. Allowing extra parameters increases the flexibility for advanced use cases. Maybe we could mention this in the docs? |
Another option would be to add an explicit "connection extras" (not sure on name) parameter that we unpack in the |
@michaelneely Do you have a quick example code how it would looks like ? |
Under the proposed approach of allowing extras, if I wanted to add the registry:
registry_type: snowflake.registry
account: ...
user: ...
password: ...
role: ...
warehouse: ...
database: ...
schema: ...
host: snowflake.localhost.localstack.cloud
provider: local
offline_store:
type: snowflake.offline
account: ...
user: ...
password: ...
role: ...
warehouse: ...
database: ...
schema: ...
host: snowflake.localhost.localstack.cloud And it "just works" because the host argument is passed through to the snowflake connector's Account, user, password, role, warehouse, database, schema are all currently documented parameters for the registry and offline store. |
@michaelneely Maybe I did not explicitly mention about the So in above comment I was looking for |
Gotcha. I think it would be exactly like above, except registry:
registry_type: snowflake.registry
account: ...
user: ...
password: ...
role: ...
warehouse: ...
database: ...
schema: ...
connection_extras:
host: snowflake.localhost.localstack.cloud And I would just update the pydantic model to include The reason I'm not really a big fan of this approach is that all these parameters (except |
Agree! Seems we are getting into more complex path. Rather lets keep this appraoch 👍 |
Thanks, @jyejare, how can I get this merged? |
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.
Looks good
What this PR does / why we need it:
There are many additional configuration options that can be specified when creating a Snowflake connection, for example: proxies, the session keep alive heartbeat interval, etc..
One concrete use case I've found already is setting the host name when testing Snowflake locally with LocalStack.
This PR allows setting additional configuration options in the
feature_store.yaml
file by changing the Snowflake Pydantic models to allow extra fields.Which issue(s) this PR fixes:
Misc