Skip to content

@sqlrooms/room-config / LoadFileOptions

Type Alias: LoadFileOptions

LoadFileOptions = {[key: string]: unknown; schema?: string; select?: string[]; where?: string; view?: boolean; temp?: boolean; replace?: boolean; options?: string | Record<string, unknown> | string[]; method: "st_read"; } | {[key: string]: unknown; schema?: string; select?: string[]; where?: string; view?: boolean; temp?: boolean; replace?: boolean; method: "read_json" | "read_ndjson" | "read_parquet" | "read_csv" | "auto"; }

Union type of all possible file loading options Discriminated union based on the 'method' field

Type Declaration

{[key: string]: unknown; schema?: string; select?: string[]; where?: string; view?: boolean; temp?: boolean; replace?: boolean; options?: string | Record<string, unknown> | string[]; method: "st_read"; }

Index Signature

[key: string]: unknown

NameTypeDescription
schema?stringSchema to load the table into
select?string[]Columns to select, defaults to ['*']
where?stringWHERE clause filter condition
view?booleanWhether to create as a view
temp?booleanWhether to create as a temporary table
replace?booleanWhether to replace existing table
options?string | Record<string, unknown> | string[]Additional options for spatial data loading
method"st_read"-

{[key: string]: unknown; schema?: string; select?: string[]; where?: string; view?: boolean; temp?: boolean; replace?: boolean; method: "read_json" | "read_ndjson" | "read_parquet" | "read_csv" | "auto"; }

Index Signature

[key: string]: unknown

NameTypeDescription
schema?stringSchema to load the table into
select?string[]Columns to select, defaults to ['*']
where?stringWHERE clause filter condition
view?booleanWhether to create as a view
temp?booleanWhether to create as a temporary table
replace?booleanWhether to replace existing table
method"read_json" | "read_ndjson" | "read_parquet" | "read_csv" | "auto"-