prefect_metricflow.tasks
Collections of tasks to interact with MetricFlow
drop_materialization
Drop a materialization that was previously created by MetricFlow.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
materialization_name |
str
|
The name of the materialization to drop. |
required |
config |
Optional[Union[Dict, str]]
|
MetricFlow configuration. Can be either a |
None
|
config_file_path |
Optional[str]
|
Path to MetricFlow config file. If not provided, the default path will be used. |
None
|
Returns:
Type | Description |
---|---|
bool
|
|
bool
|
|
Source code in prefect_metricflow/tasks.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
materialize
Materialize metrics on the target DWH.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
materialization_name |
str
|
The name of the materialization to be created. |
required |
start_time |
Optional[str]
|
The start time range to be used to build the materialization. |
None
|
end_time |
Optional[str]
|
The end time range to be used to build the materialization. |
None
|
config |
Optional[Union[Dict, str]]
|
MetricFlow configuration. Can be either a |
None
|
config_file_path |
Optional[str]
|
Path to MetricFlow config file. If not provided, the default path will be used. |
None
|
Returns:
Type | Description |
---|---|
SqlTable
|
a SqlTable with references to the newly created materialization. |
Source code in prefect_metricflow/tasks.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|