(
table: pyarrow.Table,
field_mapping: Dict[str, str],
)
| 306 | |
| 307 | |
| 308 | def _run_pyarrow_field_mapping( |
| 309 | table: pyarrow.Table, |
| 310 | field_mapping: Dict[str, str], |
| 311 | ) -> pyarrow.Table: |
| 312 | # run field mapping in the forward direction |
| 313 | cols = table.column_names |
| 314 | mapped_cols = [ |
| 315 | field_mapping[col] if col in field_mapping.keys() else col for col in cols |
| 316 | ] |
| 317 | table = table.rename_columns(mapped_cols) |
| 318 | return table |
| 319 | |
| 320 | |
| 321 | def _get_fields_with_aliases( |
no test coverage detected