Skip to main content

No project description provided

Project description

Snowpark Session Util

A simple utility for spark and mlflow session objects

Setup

Quick Install

python -m pip install snowpark_session

Build from source

Clone the repository

git clone https://github.com/Broomva/snowpark_session.git

Install the package

cd snowpark_session && make install

Build manually

After cloning, create a virtual environment

conda create -n snowpark_session python=3.8
conda activate snowpark_session
conda install snowflake-snowpark-python pandas

Install the requirements

pip install -r requirements.txt

Run the python installation

python setup.py install

Usage

The deployment requires a .env file created under local folder:

touch .env

It should have a schema like this:

snowflake_account=''
snowflake_user=''
snowflake_password=''
snowflake_user_role=''
snowflake_warehouse=''
snowflake_database=''
snowflake_schema=''

# Optional
azureml_experiment_name=''
azureml_experiment_id=''
azureml_subscription_id=''
azureml_resource_group=''
azureml_workspace_name=''
import snowpark_session as ss

# Create a Spark session
spark = ss.SnowparkSession().get_session()

# Connect to MLFLow Artifact Server
mlflow_session = ss.AzureMLFlowSession().get_session()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snowpark_session-0.1.2.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

snowpark_session-0.1.2-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page