Skip to content

Latest commit

 

History

History
159 lines (97 loc) · 4.8 KB

schema.md

File metadata and controls

159 lines (97 loc) · 4.8 KB

dbcp / Exports / schema

Module: schema

Table of contents

Interfaces

Functions

Functions

formatDDLCreateTableSchema

formatDDLCreateTableSchema(tableName: string, columnsInfo: Column[], columnType?: Record<string, string>): string

Parameters

Name Type
tableName string
columnsInfo Column[]
columnType? Record<string, string>

Returns: string

Defined in: schema.ts:192


formatDDLType

formatDDLType(columnInfo: Column | undefined, indent: string): string

Parameters

Name Type
columnInfo Column | undefined
indent string

Returns: string

Defined in: schema.ts:210


getDDLColumnType

getDDLColumnType(columnInfo: Column): "boolean" | "bigint" | "float" | "string" | "array" | "struct"

Parameters

Name Type
columnInfo Column

Returns: "boolean" | "bigint" | "float" | "string" | "array" | "struct"

Defined in: schema.ts:228


guessColumnType

guessColumnType(column: Column, value: Record<string, any>): void

Parameters

Name Type
column Column
value Record<string, any>

Returns: void

Defined in: schema.ts:81


guessSchemaFromFile

guessSchemaFromFile(fileSystem: FileSystem, file: DatabaseCopyInputFile, args: DatabaseCopyOptions): Promise<Record<string, Column>>

Parameters

Name Type
fileSystem FileSystem
file DatabaseCopyInputFile
args DatabaseCopyOptions

Returns: Promise<Record<string, Column>>

Defined in: schema.ts:50


newSchemaColumn

newSchemaColumn(table: string, name: string, type: string): Column

Parameters

Name Type
table string
name string
type string

Returns: Column

Defined in: schema.ts:31


normalizeToSchema

normalizeToSchema(record: any, columns: Column[], columnType?: Record<string, any>): any

Parameters

Name Type
record any
columns Column[]
columnType? Record<string, any>

Returns: any

Defined in: schema.ts:121


parquetFieldFromSchema

parquetFieldFromSchema(schema: Column, columnType?: Record<string, any>): { compression: undefined = 'GZIP'; optional: boolean ; type: string = 'BOOLEAN' } | { compression: string = 'GZIP'; optional: boolean ; type: string = 'JSON' }

Parameters

Name Type
schema Column
columnType? Record<string, any>

Returns: { compression: undefined = 'GZIP'; optional: boolean ; type: string = 'BOOLEAN' } | { compression: string = 'GZIP'; optional: boolean ; type: string = 'JSON' }

Defined in: schema.ts:165