read_metadata_yaml
ReadMetadataYAMLAction
¶
Bases: PipelineAction
Reads table metadata from a yaml file using the Table model.
Example
Source code in src/cloe_nessy/pipeline/actions/read_metadata_yaml.py
run(context, *, file_path=None, catalog_name=None, schema_name=None, storage_path=None, **_)
¶
Reads table metadata from a yaml file using the Table model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
PipelineContext
|
The context in which this Action is executed. |
required |
file_path
|
str | None
|
The path to the file that defines the table. |
None
|
catalog_name
|
str | None
|
The name of the catalog for the table. |
None
|
schema_name
|
str | None
|
The name of the schema for the table. |
None
|
storage_path
|
str | None
|
The storage path for the table, if applicable. If not provided, the table will be considered a managed table. |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If any issues occur while reading the table metadata, such as an invalid table, missing file, missing path, or missing catalog/schema names. |
Returns:
| Type | Description |
|---|---|
PipelineContext
|
The context after the execution of this Action, containing the table metadata. |