( configFileFormat?: string, )
| 330 | * @return File format used when creating an Iceberg table. |
| 331 | */ |
| 332 | export function getFileFormatValueForIcebergTable( |
| 333 | configFileFormat?: string, |
| 334 | ): dataform.FileFormat { |
| 335 | if (!configFileFormat) { |
| 336 | // Default to PARQUET if fileFormat is undefined. |
| 337 | return dataform.FileFormat.PARQUET; |
| 338 | } |
| 339 | |
| 340 | switch (configFileFormat.toUpperCase()) { |
| 341 | case "PARQUET": |
| 342 | return dataform.FileFormat.PARQUET; |
| 343 | |
| 344 | default: |
| 345 | throw new Error( |
| 346 | `File format ${configFileFormat} is not supported.`, |
| 347 | ); |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | /** |
| 352 | * Returns the connection for an Iceberg table, as specified in the user's config file. |
no outgoing calls
no test coverage detected