Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Building and Testing Snowflake Connector for Python

Building

Install Python 2.7.9 or higher, or 3.4.3 or higher. Clone the Snowflake Connector for Python repository, then run the following command to create a wheel package:

git clone [email protected]:snowflakedb/snowflake-connector-python.git
cd snowflake-connector-python
pyvenv /tmp/test_snowflake_connector_python
source /tmp/test_snowflake_connector_python/bin/activate
pip install -U pip setuptools wheel
python setup.py bdist_wheel

Find the snowflake_connector_python*.whl package in the ./dist directory.

Testing

Create a virtualenv, with parameters.py in a test directory.

pyvenv /tmp/test_snowflake_connector_python
source /tmp/test_snowflake_connector_python/bin/activate
pip install Cython
pip install pytest numpy pandas
pip install dist/snowflake_connector_python*.whl
vim test/parameters.py

In the parameters.py file, include the connection information in a Python dictionary.

CONNECTION_PARAMETERS = {
    'account':  'testaccount',
    'user':     'user1',
    'password': 'testpasswd',
    'schema':   'testschema',
    'database': 'testdb',
}

Run the test:

py.test test