Summit Public Schools Snowflake warehouse for use in Airflow
Project description
spswarehouse_airflow
This package is a clone of spswarehouse
, adapted to be used in Airflow. Rather than using a credentials.py file, it pulls credentials from Airflow's Connections.
Current Version
Currently, only the Warehouse-related functionality has been adapted. Google Drive, Google Sheets, and Google Slides are not yet supported.
Usage
The main difference in this packages is that you do not import Warehouse
directly from the package. Instead, you will import the function create_warehouse
, and then call that function to create the warehouse connection when you need it. After completing the Warehouse work, you need to manually close the Warehouse connection.
At the top of your DAG file:
from spswarehouse_airflow.warehouse import create_warehouse
from spswarehouse_airflow.table_utils import *
In a function that is fed to a PythonOperator:
Warehouse = create_warehouse()
<Whatever it is you need to do in the warehouse>
Warehouse.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for spswarehouse_airflow-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4789c047eeba8d3934543d0a091733304124c93703a6ca1a87cd9b11840e2fb3 |
|
MD5 | 5e2422b183330e7b57ceb323aefbc6c1 |
|
BLAKE2b-256 | d5ca12cdc6dc3729933c6ce860be1ace877eeda433e47f3c460607b3b6a9b8cc |