feat(table-import): add DuckDB Parquet imports
This commit is contained in:
1 parent
f61f64f727
commit
02f27dc294
26 files changed
+686
-46
No files matched your search
@@ -2888,6 +2888,8 @@ export async function previewTableImportFile(fileOrPath: string | File | TableIm
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
sourceRef: options.sourceRef,
|
||||
connectionId: options.connectionId,
|
||||
database: options.database,
|
||||
sourceFormat: options.sourceFormat,
|
||||
parseOptions: options.parseOptions,
|
||||
previewLimit: options.previewLimit,
|
||||
@@ -2898,6 +2900,8 @@ export async function previewTableImportFile(fileOrPath: string | File | TableIm
|
||||
}
|
||||
const formData = new FormData();
|
||||
formData.append("file", fileOrPath);
|
||||
if (options.connectionId) formData.append("connectionId", options.connectionId);
|
||||
if (options.database != null) formData.append("database", options.database);
|
||||
if (options.sourceFormat) formData.append("sourceFormat", options.sourceFormat);
|
||||
if (options.parseOptions) formData.append("parseOptions", JSON.stringify(options.parseOptions));
|
||||
if (options.previewLimit != null) formData.append("previewLimit", String(options.previewLimit));
|
||||
|
||||
@@ -5447,7 +5447,7 @@ export type TableImportMode = "append" | "truncate";
|
||||
export type TableImportConflictPolicy = "error" | "skip" | "updateExisting";
|
||||
export type TableImportStatus = "running" | "done" | "error" | "cancelled";
|
||||
export type TableImportPhase = "preparing" | "detectingEncoding" | "reading" | "writing" | "finalizing" | "done";
|
||||
export type TableImportSourceFormat = "csv" | "tsv" | "delimited" | "json" | "excel" | "sql";
|
||||
export type TableImportSourceFormat = "csv" | "tsv" | "delimited" | "json" | "excel" | "sql" | "parquet";
|
||||
export type TableImportJsonShape = "auto" | "objects" | "arrays";
|
||||
export type TableImportTextEncoding = "auto" | "utf8" | "gbk" | "utf16Le" | "utf16Be";
|
||||
|
||||
@@ -5474,6 +5474,8 @@ export interface TableImportParseOptions {
|
||||
|
||||
export interface TableImportPreviewRequest {
|
||||
filePath: string;
|
||||
connectionId?: string | null;
|
||||
database?: string | null;
|
||||
sourceRef?: string | null;
|
||||
sourceFormat?: TableImportSourceFormat | null;
|
||||
parseOptions?: TableImportParseOptions | null;
|
||||
|
||||
Reference in new issue
Block a user