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

Function validateIcebergConfigTableFolderRoot

cli/util.ts:183–189  ·  view source on GitHub ↗
(tableFolderRoot: string)

Source from the content-addressed store, hash-verified

181 * - Cannot contain the sequence "..".
182 */
183export function validateIcebergConfigTableFolderRoot(tableFolderRoot: string): void {
184 if (!/^[a-zA-Z0-9][a-zA-Z0-9-._]{1,220}[a-zA-Z0-9]$/.test(tableFolderRoot) || tableFolderRoot.includes("..")) {
185 throw new Error(
186 "Invalid input. Must start and end with a letter or number, contain only letters (a-z, A-Z), numbers, hyphens (-), underscores (_), and periods (.)."
187 );
188 }
189}
190
191/**
192 * Validates a string to ensure it is a valid subpath within an Iceberg table folder.

Callers 2

util_test.tsFile · 0.90
promptForIcebergConfigFunction · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected