|
140 | 140 |
|
141 | 141 |
|
142 | 142 | def _construct_parameters(
|
143 |
| - metadata_location: str, glue_table: Optional["TableTypeDef"] = None, prev_metadata_location: Optional[str] = None |
| 143 | + metadata_location: str, |
| 144 | + glue_table: Optional["TableTypeDef"] = None, |
| 145 | + prev_metadata_location: Optional[str] = None, |
| 146 | + metadata_properties: Optional[Properties] = None, |
144 | 147 | ) -> Properties:
|
145 | 148 | new_parameters = glue_table.get("Parameters", {}) if glue_table else {}
|
146 | 149 | new_parameters.update({TABLE_TYPE: ICEBERG.upper(), METADATA_LOCATION: metadata_location})
|
147 | 150 | if prev_metadata_location:
|
148 | 151 | new_parameters[PREVIOUS_METADATA_LOCATION] = prev_metadata_location
|
| 152 | + |
| 153 | + if metadata_properties: |
| 154 | + for key, value in metadata_properties.items(): |
| 155 | + new_parameters[key] = str(value) |
| 156 | + |
149 | 157 | return new_parameters
|
150 | 158 |
|
151 | 159 |
|
@@ -236,7 +244,7 @@ def _construct_table_input(
|
236 | 244 | table_input: "TableInputTypeDef" = {
|
237 | 245 | "Name": table_name,
|
238 | 246 | "TableType": EXTERNAL_TABLE,
|
239 |
| - "Parameters": _construct_parameters(metadata_location, glue_table, prev_metadata_location), |
| 247 | + "Parameters": _construct_parameters(metadata_location, glue_table, prev_metadata_location, properties), |
240 | 248 | "StorageDescriptor": {
|
241 | 249 | "Columns": _to_columns(metadata),
|
242 | 250 | "Location": metadata.location,
|
|
0 commit comments