dagster
Utilities for working with the dagster instance
PartitionDefinition3DBagDistribution
¶
Bases: StaticPartitionsDefinition
Distribution tiles
Source code in bag3d/common/utils/dagster.py
62 63 64 65 66 67 68 69 70 71 72 |
|
format_date(input_date, version=True)
¶
Formats a date for using it in versions, filenames, attributes etc.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_date
|
date
|
|
required |
version
|
bool
|
If True, format the input_date as '9999.99.99', else as '9999-99-99' |
True
|
Source code in bag3d/common/utils/dagster.py
39 40 41 42 43 44 45 46 47 48 49 |
|
get_run_id(context, short=True)
¶
Return the Run ID from the execution context.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
context
|
A dagster context object. |
required | |
short
|
bool
|
Return only the first 8 characters of the ID or the complete ID. |
True
|
Source code in bag3d/common/utils/dagster.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
get_upstream_data_version(context, asset_key)
¶
Get the data version of an upstream asset. The upstream asset must be a dependency of the current asset that passes its execution context into this function.
Source code in bag3d/common/utils/dagster.py
52 53 54 55 56 57 58 59 |
|