Dagster library for Hex
Project description
Hex Dagster Library
Installation
To install the library, use pip alongside your existing Dagster environment.
pip install dagster_hex
Configuration
First, you'll need to specify your Hex API Token key as a resource.
# resources.py
from dagster_hex.resources import hex_resource
import os
API_KEY = os.getenv['DAGSTER_PROD_API']
my_resource = hex_resource.configured({'api_key': API_KEY})
Ops
The hex_project_op
will call the Hex API to run a project until it completes.
from dagster_hex.resources import hex_resource
from dagster import job
from dagster_hex.ops import hex_project_op
API_KEY = 'abc123'
PROJ_ID = 'i-love-uuids'
my_resource = hex_resource.configured({'api_key': API_KEY})
run_hex_op = hex_project_op.configured({"project_id": PROJ_ID},
name='run_job')
@job(resource_defs={"hex": my_resource})
def hex_job():
run_hex_op()
Asset Materializations
Ops will return an AssetMaterialization
with the following keys:
run_url
run_status_url
trace_id
run_id
elapsed_time
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
dagster-hex-0.1.0.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for dagster_hex-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b42ec16781d2eb6e49121ac88e10fbc8f80a844241b141e31fc0c8c3484fc7b0 |
|
MD5 | 9c9b30e8ed237b9f87db3029552641c9 |
|
BLAKE2b-256 | 496ccd3505f7651b02dd6eee5b513d2f5afe1fefeb21ddb42c89c6fd61034c26 |