@gscdump/lakehouse 0.39.0 → 0.40.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -23
- package/dist/index.mjs +1 -32
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -180,26 +180,4 @@ interface IcebergDataset {
|
|
|
180
180
|
* from the def. See {@link IcebergDatasetDef}.
|
|
181
181
|
*/
|
|
182
182
|
declare function defineIcebergDataset(def: IcebergDatasetDef): IcebergDataset;
|
|
183
|
-
|
|
184
|
-
rowCount?: number;
|
|
185
|
-
error?: string;
|
|
186
|
-
}
|
|
187
|
-
interface RunPyIcebergWriterOptions {
|
|
188
|
-
python: string;
|
|
189
|
-
script: string;
|
|
190
|
-
job: unknown;
|
|
191
|
-
label: string;
|
|
192
|
-
processErrorAsParseFailure?: boolean;
|
|
193
|
-
rejectOnProcessError?: boolean;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* @deprecated Import the engine-owned PyIceberg runtime instead. Retained as a
|
|
197
|
-
* compatibility shim for consumers of `@gscdump/lakehouse` 0.x.
|
|
198
|
-
*/
|
|
199
|
-
declare function resolvePyIcebergPython(override?: string): string;
|
|
200
|
-
/**
|
|
201
|
-
* @deprecated Import the engine-owned PyIceberg runtime instead. Retained as a
|
|
202
|
-
* compatibility shim for consumers of `@gscdump/lakehouse` 0.x.
|
|
203
|
-
*/
|
|
204
|
-
declare function runPyIcebergWriter<T extends PyIcebergWriterResult>(options: RunPyIcebergWriterOptions): Promise<T>;
|
|
205
|
-
export { type AppendCommitOptions, type AppendResult, type AppendSink, type AppendSinkCloseResult, type AppendSinkOptions, type CatalogCache, type CommitRetryOptions, type ConnectIcebergOptions, DEFAULT_PARTITION_KEY_ENCODING, type DatasetDim, type DatasetIdentity, ICEBERG_TYPE_MAP, type IcebergCatalogConfig, type IcebergColumn, type IcebergColumnType, type IcebergConnection, type IcebergDataset, type IcebergDatasetColumnDef, type IcebergDatasetDef, type IcebergDatasetLedger, type IcebergFieldSummary, type IcebergListedDataFile, type IcebergPartitionField, type IcebergPartitionSpec, type IcebergPartitionSpecField, type IcebergPartitionTransform, type IcebergPrimitiveType, type IcebergS3Config, type IcebergSchema, type IcebergSchemaField, type IcebergSortOrder, type IcebergSortOrderField, type IcebergTableOpResult, type IcebergTableSpec, type ManifestPartitionFilter, type PartitionKeyEncoding, type PartitionValueMatch, type PyIcebergWriterResult, type QueryProfiler, type ResolveDataFilesOptions, type ResolveIcebergDataFilesOptions, type RunPyIcebergWriterOptions, bigintJsonReplacer, buildManifestPartitionFilter, cacheGet, cachePut, catalogCacheScope, coerceBigIntToNumber, connectIcebergCatalog, defineIcebergDataset, deriveTableSpec, dropIcebergTables, encodeJsonBigintSafe, ensureIcebergNamespace, invalidateSnapshotRef, listIcebergTables, resolveIcebergDataFiles, resolvePyIcebergPython, runPyIcebergWriter, stringifyBigintSafe, toIcebergDayCount };
|
|
183
|
+
export { type AppendCommitOptions, type AppendResult, type AppendSink, type AppendSinkCloseResult, type AppendSinkOptions, type CatalogCache, type CommitRetryOptions, type ConnectIcebergOptions, DEFAULT_PARTITION_KEY_ENCODING, type DatasetDim, type DatasetIdentity, ICEBERG_TYPE_MAP, type IcebergCatalogConfig, type IcebergColumn, type IcebergColumnType, type IcebergConnection, type IcebergDataset, type IcebergDatasetColumnDef, type IcebergDatasetDef, type IcebergDatasetLedger, type IcebergFieldSummary, type IcebergListedDataFile, type IcebergPartitionField, type IcebergPartitionSpec, type IcebergPartitionSpecField, type IcebergPartitionTransform, type IcebergPrimitiveType, type IcebergS3Config, type IcebergSchema, type IcebergSchemaField, type IcebergSortOrder, type IcebergSortOrderField, type IcebergTableOpResult, type IcebergTableSpec, type ManifestPartitionFilter, type PartitionKeyEncoding, type PartitionValueMatch, type QueryProfiler, type ResolveDataFilesOptions, type ResolveIcebergDataFilesOptions, bigintJsonReplacer, buildManifestPartitionFilter, cacheGet, cachePut, catalogCacheScope, coerceBigIntToNumber, connectIcebergCatalog, defineIcebergDataset, deriveTableSpec, dropIcebergTables, encodeJsonBigintSafe, ensureIcebergNamespace, invalidateSnapshotRef, listIcebergTables, resolveIcebergDataFiles, stringifyBigintSafe, toIcebergDayCount };
|
package/dist/index.mjs
CHANGED
|
@@ -325,36 +325,5 @@ function defineIcebergDataset(def) {
|
|
|
325
325
|
resolveDataFiles
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
|
-
function importRuntimeModule(specifier) {
|
|
329
|
-
return import(specifier);
|
|
330
|
-
}
|
|
331
|
-
function resolvePyIcebergPython(override) {
|
|
332
|
-
const env = Reflect.get(globalThis, "process")?.env;
|
|
333
|
-
return override ?? env?.["GSCDUMP_ICEBERG_PYTHON"] ?? "python3";
|
|
334
|
-
}
|
|
335
|
-
async function runPyIcebergWriter(options) {
|
|
336
|
-
const { execFile } = await importRuntimeModule("node:child_process");
|
|
337
|
-
return new Promise((resolve, reject) => {
|
|
338
|
-
execFile(options.python, [options.script], { maxBuffer: 64 * 1024 * 1024 }, (err, stdout, stderr) => {
|
|
339
|
-
let parsed;
|
|
340
|
-
if (stdout.trim()) try {
|
|
341
|
-
parsed = JSON.parse(stdout);
|
|
342
|
-
} catch {}
|
|
343
|
-
if (parsed && !(err && options.rejectOnProcessError)) {
|
|
344
|
-
resolve(parsed);
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
|
-
if (err) {
|
|
348
|
-
if (options.processErrorAsParseFailure) {
|
|
349
|
-
reject(/* @__PURE__ */ new Error(`${options.label} produced no parseable output (${err.message})${stderr ? `: ${stderr}` : ""}`));
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
|
-
reject(/* @__PURE__ */ new Error(`${options.label} process failed (${err.message})${stderr ? `: ${stderr}` : ""}`));
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
reject(/* @__PURE__ */ new Error(`${options.label} produced no parseable output: ${stdout || stderr}`));
|
|
356
|
-
}).stdin?.end(JSON.stringify(options.job));
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
328
|
const DEFAULT_PARTITION_KEY_ENCODING = "int";
|
|
360
|
-
export { DEFAULT_PARTITION_KEY_ENCODING, ICEBERG_TYPE_MAP, bigintJsonReplacer, buildManifestPartitionFilter, cacheGet, cachePut, catalogCacheScope, coerceBigIntToNumber, connectIcebergCatalog, defineIcebergDataset, deriveTableSpec, dropIcebergTables, encodeJsonBigintSafe, ensureIcebergNamespace, invalidateSnapshotRef, listIcebergTables, resolveIcebergDataFiles,
|
|
329
|
+
export { DEFAULT_PARTITION_KEY_ENCODING, ICEBERG_TYPE_MAP, bigintJsonReplacer, buildManifestPartitionFilter, cacheGet, cachePut, catalogCacheScope, coerceBigIntToNumber, connectIcebergCatalog, defineIcebergDataset, deriveTableSpec, dropIcebergTables, encodeJsonBigintSafe, ensureIcebergNamespace, invalidateSnapshotRef, listIcebergTables, resolveIcebergDataFiles, stringifyBigintSafe, toIcebergDayCount };
|
package/package.json
CHANGED