write_catalog_table
WriteCatalogTableAction
¶
Bases: PipelineAction
Writes a DataFrame to a specified catalog table using CatalogWriter.
Examples:
Source code in src/cloe_nessy/pipeline/actions/write_catalog_table.py
10 11 12 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 56 57 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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
run(context, *, table_identifier=None, mode='append', partition_by=None, options=None, checkpoint_location=None, trigger_dict=None, await_termination=False, **_)
¶
Writes a DataFrame to a specified catalog table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
PipelineContext
|
Context in which this Action is executed. |
required |
table_identifier
|
str | None
|
The table identifier in the unity catalog in the format 'catalog.schema.table'. If not provided, attempts to use the context's table metadata. |
None
|
mode
|
str
|
The write mode. One of 'append', 'overwrite', 'error', 'errorifexists', or 'ignore'. |
'append'
|
partition_by
|
str | list[str] | None
|
Names of the partitioning columns. |
None
|
checkpoint_location
|
str | None
|
Location for checkpointing. |
None
|
trigger_dict
|
dict | None
|
A dictionary specifying the trigger configuration for the streaming query. |
None
|
await_termination
|
bool
|
If True, the function will wait for the streaming query to finish before returning. |
False
|
options
|
dict[str, str] | None
|
Additional options for the DataFrame write operation. |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If the table name is not specified or cannot be inferred from the context. |
Returns:
| Type | Description |
|---|---|
PipelineContext
|
Context after the execution of this Action. |