How to connect snowflake using robotframework

I am not able to connect to the snowflake with robot framework. Please help.

I can connect to snowflake using python but how to do same with robot framework I am not able to understand.

I have used Installing the Python Connector β€” Snowflake Documentation

Hi Surabhi,

I have no idea what snowflake is in this context or if there is a robot framework library for it, since there’s been no replies yet I guess not?

As there is a python module for it you could easily write your own robot framework keywords to do what you need, refer to Creating test libraries for details of how to do that.

Dave.

You can use the robotframework-databaselibrary and modify it to make the snowflake specific connection and use the right sql dialect.

YouΒ΄d do something like

self._dbconnection = snowflake.connector.connect(user=dbUser, account=dbAccount, database=dbDatabase, schema=dbSchema,warehouse=dbWarehouse,role=dbRole,private_key=pkb)

after loading the private key from a keyfile (Using the Python Connector β€” Snowflake Documentation)

1 Like

I had the same issue as surabhi and with some research into the snowflake package I was able to make this work:

Connect To Database Using Custom params snowflake.connector user=β€˜β€™, password=β€˜β€™,authenticator=β€˜β€™,account=β€˜β€™,warehouse=β€˜β€™,database=β€˜β€™,schema=β€˜β€™,role=β€˜β€™

I used the following page for help regarding the parameters: Connecting to Snowflake with the Python Connector | Snowflake Documentation

1 Like