Skip to content

Commit

Permalink
Added Documentation and Skipped Integration test for Snowflake
Browse files Browse the repository at this point in the history
  • Loading branch information
Lohith K S authored and Lohith K S committed Oct 20, 2023
1 parent aef8d2e commit 83ba8f6
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ parts:
- file: source/reference/databases/mariadb
- file: source/reference/databases/clickhouse
- file: source/reference/databases/github
- file: source/reference/databases/snowflake

- file: source/reference/vector_databases/index
title: Vector Databases
Expand Down
47 changes: 47 additions & 0 deletions docs/source/reference/databases/snowflake.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Snowflake
==========

The connection to Snowflake is based on the `snowflake-connector-python <https://pypi.org/project/snowflake-connector-python/>`_ library.

Dependency
----------

* snowflake-connector-python

Parameters
----------

Required:

* `user` is the database user.
* `password` is the snowflake account password.
* `database` is the database name.
* `warehouse` is the snowflake warehouse name.
* `account` is the snowflake account number ( can be found in the url ).
* `schema` is the schema name.


.. warning::

Provide the parameters of an already running ``Snowflake`` Data Warehouse. EvaDB only connects to an existing ``Snowflake`` Data Warehouse.

Create Connection
-----------------

.. code-block:: text
CREATE DATABASE snowflake_data WITH ENGINE = 'snowflake', PARAMETERS = {
"user": "<username>",
"password": "<my_password>"
"account": "<account_number>",
"database": "EVADB",
"warehouse": "COMPUTE_WH",
"schema": "SAMPLE_DATA"
};
.. warning::

In Snowflake Terminology, ``Database`` and ``Schema`` refer to the following.
A database is a logical grouping of schemas. Each database belongs to a single Snowflake account.
A schema is a logical grouping of database objects (tables, views, etc.). Each schema belongs to a single database.

4 changes: 3 additions & 1 deletion test/third_party_tests/test_native_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ def test_should_run_query_in_clickhouse(self):
self._execute_native_query()
self._execute_evadb_query()

@pytest.mark.skip(
reason="Snowflake does not come with a free version of account, so integration test is not feasible"
)
def test_should_run_query_in_snowflake(self):
# Create database.
params = {
Expand All @@ -247,7 +250,6 @@ def test_should_run_query_in_snowflake(self):
self._execute_native_query()
self._execute_evadb_query()


def test_should_run_query_in_sqlite(self):
# Create database.
import os
Expand Down

0 comments on commit 83ba8f6

Please sign in to comment.