From a3748214e5b3772b0e219d0d14e55217715098e2 Mon Sep 17 00:00:00 2001 From: Anatoli Kurtsevich Date: Wed, 25 Oct 2023 18:24:17 -0400 Subject: [PATCH] update README on how to use the SDK --- relationalai-snowflake-sdk/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/relationalai-snowflake-sdk/README.md b/relationalai-snowflake-sdk/README.md index 44326bf..116876f 100644 --- a/relationalai-snowflake-sdk/README.md +++ b/relationalai-snowflake-sdk/README.md @@ -23,6 +23,27 @@ $ cd rai-sdk-python $ [sudo] pip install -e relationalai-snowflake-sdk ``` +### Usage + +Create a session according to [Snowpark API](https://docs.snowflake.com/en/developer-guide/snowpark/python/creating-session) + +```python +from snowflake.snowpark import Session +from relationalai.snowflake_sdk import api + +# +connection_parameters = { + "user": "...", + # and any other connection parameters +} + +session = Session.builder.configs(connection_parameters).create() + +api.use_schema(session, "#database.schema where RAI SQL Library is installed") + +api.create_database(session, "my-database") +``` + ## Support You can reach the RAI developer support team at `support@relational.ai`