MCPcopy Create free account
hub / github.com/dataform-co/dataform / getFileFormatValueForIcebergTable

Function getFileFormatValueForIcebergTable

core/utils.ts:332–349  ·  view source on GitHub ↗
(
  configFileFormat?: string,
)

Source from the content-addressed store, hash-verified

330 * @return File format used when creating an Iceberg table.
331 */
332export 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.

Callers 3

utils_test.tsFile · 0.90
constructorMethod · 0.90
constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected