Open sfc-gh-jfreeberg opened 1 year ago
Add the following methods to the Session class:
.getCurrentAccount() -> Optional<String>
.getCurrentWarehouse() -> Optional<String>
.getCurrentRole() -> Optional<String>
These methods can be used to change the db/role/warehouse at different stages of a job.
.setDatabase(database: string) -> void
.setRole(role: string) -> void
.setSchema(schema: string) -> void
.setWarehouse(warehouse: string) -> void
Each should return the string of the corresponding key. For reference, here is the implementation in the Python SDK: https://github.com/snowflakedb/snowpark-python/blob/main/src/snowflake/snowpark/session.py
Can i have a look at this one too?
You can assign this one also to me. Thank you
Hello , Do you mean something like this ?
Optional getCurrentAccount() { var account = session.conn().getParameterValue("account", false, Option.empty()); return Optional.of(account); }
Add the following methods to the Session class:
.getCurrentAccount() -> Optional<String>
.getCurrentWarehouse() -> Optional<String>
.getCurrentRole() -> Optional<String>
These methods can be used to change the db/role/warehouse at different stages of a job.
.setDatabase(database: string) -> void
.setRole(role: string) -> void
.setSchema(schema: string) -> void
.setWarehouse(warehouse: string) -> void
Each should return the string of the corresponding key. For reference, here is the implementation in the Python SDK: https://github.com/snowflakedb/snowpark-python/blob/main/src/snowflake/snowpark/session.py