@polyglot-sql/sdk 0.3.11 → 0.4.0
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/README.md +40 -0
- package/dist/cdn/polyglot.esm.js +1841 -1768
- package/dist/index.cjs +106 -0
- package/dist/index.d.cts +90 -0
- package/dist/index.d.ts +90 -0
- package/dist/index.js +123 -1
- package/dist/polyglot_sql_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2037,6 +2037,66 @@ function lineage_sql_with_schema$1(sql, column, schema_json, dialect, trim_selec
|
|
|
2037
2037
|
wasm$3.__wbindgen_export4(deferred5_0, deferred5_1, 1);
|
|
2038
2038
|
}
|
|
2039
2039
|
}
|
|
2040
|
+
function openlineage_column_lineage$1(sql, options_json) {
|
|
2041
|
+
let deferred3_0;
|
|
2042
|
+
let deferred3_1;
|
|
2043
|
+
try {
|
|
2044
|
+
const retptr = wasm$3.__wbindgen_add_to_stack_pointer(-16);
|
|
2045
|
+
const ptr0 = passStringToWasm0(sql, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2046
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2047
|
+
const ptr1 = passStringToWasm0(options_json, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2048
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2049
|
+
wasm$3.openlineage_column_lineage(retptr, ptr0, len0, ptr1, len1);
|
|
2050
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2051
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2052
|
+
deferred3_0 = r0;
|
|
2053
|
+
deferred3_1 = r1;
|
|
2054
|
+
return getStringFromWasm0(r0, r1);
|
|
2055
|
+
} finally {
|
|
2056
|
+
wasm$3.__wbindgen_add_to_stack_pointer(16);
|
|
2057
|
+
wasm$3.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
function openlineage_job_event$1(sql, options_json) {
|
|
2061
|
+
let deferred3_0;
|
|
2062
|
+
let deferred3_1;
|
|
2063
|
+
try {
|
|
2064
|
+
const retptr = wasm$3.__wbindgen_add_to_stack_pointer(-16);
|
|
2065
|
+
const ptr0 = passStringToWasm0(sql, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2066
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2067
|
+
const ptr1 = passStringToWasm0(options_json, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2068
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2069
|
+
wasm$3.openlineage_job_event(retptr, ptr0, len0, ptr1, len1);
|
|
2070
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2071
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2072
|
+
deferred3_0 = r0;
|
|
2073
|
+
deferred3_1 = r1;
|
|
2074
|
+
return getStringFromWasm0(r0, r1);
|
|
2075
|
+
} finally {
|
|
2076
|
+
wasm$3.__wbindgen_add_to_stack_pointer(16);
|
|
2077
|
+
wasm$3.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
function openlineage_run_event$1(sql, options_json) {
|
|
2081
|
+
let deferred3_0;
|
|
2082
|
+
let deferred3_1;
|
|
2083
|
+
try {
|
|
2084
|
+
const retptr = wasm$3.__wbindgen_add_to_stack_pointer(-16);
|
|
2085
|
+
const ptr0 = passStringToWasm0(sql, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2086
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2087
|
+
const ptr1 = passStringToWasm0(options_json, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2088
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2089
|
+
wasm$3.openlineage_run_event(retptr, ptr0, len0, ptr1, len1);
|
|
2090
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2091
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2092
|
+
deferred3_0 = r0;
|
|
2093
|
+
deferred3_1 = r1;
|
|
2094
|
+
return getStringFromWasm0(r0, r1);
|
|
2095
|
+
} finally {
|
|
2096
|
+
wasm$3.__wbindgen_add_to_stack_pointer(16);
|
|
2097
|
+
wasm$3.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2040
2100
|
function parse$2(sql, dialect) {
|
|
2041
2101
|
let deferred3_0;
|
|
2042
2102
|
let deferred3_1;
|
|
@@ -2950,6 +3010,9 @@ async function __polyglot_init_wasm() {
|
|
|
2950
3010
|
get_dialects_value = __vite__wasmModule.get_dialects_value;
|
|
2951
3011
|
lineage_sql = __vite__wasmModule.lineage_sql;
|
|
2952
3012
|
lineage_sql_with_schema = __vite__wasmModule.lineage_sql_with_schema;
|
|
3013
|
+
openlineage_column_lineage = __vite__wasmModule.openlineage_column_lineage;
|
|
3014
|
+
openlineage_job_event = __vite__wasmModule.openlineage_job_event;
|
|
3015
|
+
openlineage_run_event = __vite__wasmModule.openlineage_run_event;
|
|
2953
3016
|
parse$1 = __vite__wasmModule.parse;
|
|
2954
3017
|
parse_value = __vite__wasmModule.parse_value;
|
|
2955
3018
|
plan$1 = __vite__wasmModule.plan;
|
|
@@ -3138,6 +3201,9 @@ let get_dialects;
|
|
|
3138
3201
|
let get_dialects_value;
|
|
3139
3202
|
let lineage_sql;
|
|
3140
3203
|
let lineage_sql_with_schema;
|
|
3204
|
+
let openlineage_column_lineage;
|
|
3205
|
+
let openlineage_job_event;
|
|
3206
|
+
let openlineage_run_event;
|
|
3141
3207
|
let parse$1;
|
|
3142
3208
|
let parse_value;
|
|
3143
3209
|
let plan$1;
|
|
@@ -3329,6 +3395,9 @@ const wasm$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
3329
3395
|
lineage_sql,
|
|
3330
3396
|
lineage_sql_with_schema,
|
|
3331
3397
|
memory,
|
|
3398
|
+
openlineage_column_lineage,
|
|
3399
|
+
openlineage_job_event,
|
|
3400
|
+
openlineage_run_event,
|
|
3332
3401
|
parse: parse$1,
|
|
3333
3402
|
parse_value,
|
|
3334
3403
|
plan: plan$1,
|
|
@@ -3510,6 +3579,9 @@ const wasmModule = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
3510
3579
|
get_dialects_value: get_dialects_value$1,
|
|
3511
3580
|
lineage_sql: lineage_sql$1,
|
|
3512
3581
|
lineage_sql_with_schema: lineage_sql_with_schema$1,
|
|
3582
|
+
openlineage_column_lineage: openlineage_column_lineage$1,
|
|
3583
|
+
openlineage_job_event: openlineage_job_event$1,
|
|
3584
|
+
openlineage_run_event: openlineage_run_event$1,
|
|
3513
3585
|
parse: parse$2,
|
|
3514
3586
|
parse_value: parse_value$1,
|
|
3515
3587
|
plan: plan$2,
|
|
@@ -5152,6 +5224,34 @@ function getSourceTables(column, sql, dialect = "generic") {
|
|
|
5152
5224
|
const resultJson = source_tables$1(sql, column, dialect);
|
|
5153
5225
|
return JSON.parse(resultJson);
|
|
5154
5226
|
}
|
|
5227
|
+
function normalizeOptions(options) {
|
|
5228
|
+
return {
|
|
5229
|
+
dialect: "generic",
|
|
5230
|
+
datasetMappings: {},
|
|
5231
|
+
...options
|
|
5232
|
+
};
|
|
5233
|
+
}
|
|
5234
|
+
function openLineageColumnLineage(sql, options) {
|
|
5235
|
+
const resultJson = openlineage_column_lineage$1(
|
|
5236
|
+
sql,
|
|
5237
|
+
JSON.stringify(normalizeOptions(options))
|
|
5238
|
+
);
|
|
5239
|
+
return JSON.parse(resultJson);
|
|
5240
|
+
}
|
|
5241
|
+
function openLineageJobEvent(sql, options) {
|
|
5242
|
+
const resultJson = openlineage_job_event$1(
|
|
5243
|
+
sql,
|
|
5244
|
+
JSON.stringify(normalizeOptions(options))
|
|
5245
|
+
);
|
|
5246
|
+
return JSON.parse(resultJson);
|
|
5247
|
+
}
|
|
5248
|
+
function openLineageRunEvent(sql, options) {
|
|
5249
|
+
const resultJson = openlineage_run_event$1(
|
|
5250
|
+
sql,
|
|
5251
|
+
JSON.stringify(normalizeOptions(options))
|
|
5252
|
+
);
|
|
5253
|
+
return JSON.parse(resultJson);
|
|
5254
|
+
}
|
|
5155
5255
|
function diff(source, target, dialect = "generic", options = {}) {
|
|
5156
5256
|
const { deltaOnly = false, f = 0.6, t = 0.6 } = options;
|
|
5157
5257
|
const resultJson = diff_sql$1(source, target, dialect, deltaOnly, f, t);
|
|
@@ -5445,6 +5545,9 @@ const index = {
|
|
|
5445
5545
|
lineage,
|
|
5446
5546
|
lineageWithSchema,
|
|
5447
5547
|
getSourceTables,
|
|
5548
|
+
openLineageColumnLineage,
|
|
5549
|
+
openLineageJobEvent,
|
|
5550
|
+
openLineageRunEvent,
|
|
5448
5551
|
diff,
|
|
5449
5552
|
hasChanges,
|
|
5450
5553
|
changesOnly,
|
|
@@ -5530,6 +5633,9 @@ exports.mergeInto = mergeInto;
|
|
|
5530
5633
|
exports.min = min;
|
|
5531
5634
|
exports.not = not;
|
|
5532
5635
|
exports.nullIf = nullIf;
|
|
5636
|
+
exports.openLineageColumnLineage = openLineageColumnLineage;
|
|
5637
|
+
exports.openLineageJobEvent = openLineageJobEvent;
|
|
5638
|
+
exports.openLineageRunEvent = openLineageRunEvent;
|
|
5533
5639
|
exports.or = or;
|
|
5534
5640
|
exports.parse = parse;
|
|
5535
5641
|
exports.plan = plan;
|
package/dist/index.d.cts
CHANGED
|
@@ -3375,6 +3375,9 @@ declare const _default: {
|
|
|
3375
3375
|
lineage: typeof lineage;
|
|
3376
3376
|
lineageWithSchema: typeof lineageWithSchema;
|
|
3377
3377
|
getSourceTables: typeof getSourceTables;
|
|
3378
|
+
openLineageColumnLineage: typeof openLineageColumnLineage;
|
|
3379
|
+
openLineageJobEvent: typeof openLineageJobEvent;
|
|
3380
|
+
openLineageRunEvent: typeof openLineageRunEvent;
|
|
3378
3381
|
diff: typeof diff;
|
|
3379
3382
|
hasChanges: typeof hasChanges;
|
|
3380
3383
|
changesOnly: typeof changesOnly;
|
|
@@ -9860,6 +9863,93 @@ declare type OpenJSONColumnDef = {
|
|
|
9860
9863
|
data_type?: DataType | null;
|
|
9861
9864
|
};
|
|
9862
9865
|
|
|
9866
|
+
/**
|
|
9867
|
+
* Build a standalone OpenLineage columnLineage facet with input/output datasets.
|
|
9868
|
+
*/
|
|
9869
|
+
export declare function openLineageColumnLineage(sql: string, options: OpenLineageOptions): OpenLineageColumnLineageResult;
|
|
9870
|
+
|
|
9871
|
+
export declare interface OpenLineageColumnLineageFacet {
|
|
9872
|
+
_producer: string;
|
|
9873
|
+
_schemaURL: string;
|
|
9874
|
+
fields: Record<string, OpenLineageColumnLineageField>;
|
|
9875
|
+
}
|
|
9876
|
+
|
|
9877
|
+
export declare interface OpenLineageColumnLineageField {
|
|
9878
|
+
inputFields: OpenLineageInputField[];
|
|
9879
|
+
}
|
|
9880
|
+
|
|
9881
|
+
export declare interface OpenLineageColumnLineageResult {
|
|
9882
|
+
success: boolean;
|
|
9883
|
+
facet?: OpenLineageColumnLineageFacet;
|
|
9884
|
+
inputs?: OpenLineageDataset[];
|
|
9885
|
+
outputs?: OpenLineageDataset[];
|
|
9886
|
+
warnings: OpenLineageWarning[];
|
|
9887
|
+
error?: string;
|
|
9888
|
+
}
|
|
9889
|
+
|
|
9890
|
+
export declare interface OpenLineageDataset {
|
|
9891
|
+
namespace: string;
|
|
9892
|
+
name: string;
|
|
9893
|
+
facets?: Record<string, unknown>;
|
|
9894
|
+
}
|
|
9895
|
+
|
|
9896
|
+
export declare interface OpenLineageDatasetId {
|
|
9897
|
+
namespace: string;
|
|
9898
|
+
name: string;
|
|
9899
|
+
}
|
|
9900
|
+
|
|
9901
|
+
export declare interface OpenLineageEventResult {
|
|
9902
|
+
success: boolean;
|
|
9903
|
+
event?: Record<string, unknown>;
|
|
9904
|
+
warnings: OpenLineageWarning[];
|
|
9905
|
+
error?: string;
|
|
9906
|
+
}
|
|
9907
|
+
|
|
9908
|
+
export declare interface OpenLineageInputField {
|
|
9909
|
+
namespace: string;
|
|
9910
|
+
name: string;
|
|
9911
|
+
field: string;
|
|
9912
|
+
transformations?: OpenLineageTransformation[];
|
|
9913
|
+
}
|
|
9914
|
+
|
|
9915
|
+
/**
|
|
9916
|
+
* Build an OpenLineage JobEvent payload. This does not send the event.
|
|
9917
|
+
*/
|
|
9918
|
+
export declare function openLineageJobEvent(sql: string, options: OpenLineageOptions): OpenLineageEventResult;
|
|
9919
|
+
|
|
9920
|
+
export declare interface OpenLineageOptions {
|
|
9921
|
+
dialect?: string;
|
|
9922
|
+
producer: string;
|
|
9923
|
+
datasetNamespace?: string;
|
|
9924
|
+
datasetMappings?: Record<string, OpenLineageDatasetId>;
|
|
9925
|
+
outputDataset?: OpenLineageDatasetId;
|
|
9926
|
+
schema?: Schema;
|
|
9927
|
+
jobNamespace?: string;
|
|
9928
|
+
jobName?: string;
|
|
9929
|
+
eventTime?: string;
|
|
9930
|
+
runId?: string;
|
|
9931
|
+
eventType?: OpenLineageRunEventType;
|
|
9932
|
+
}
|
|
9933
|
+
|
|
9934
|
+
/**
|
|
9935
|
+
* Build an OpenLineage RunEvent payload. This does not send the event.
|
|
9936
|
+
*/
|
|
9937
|
+
export declare function openLineageRunEvent(sql: string, options: OpenLineageOptions): OpenLineageEventResult;
|
|
9938
|
+
|
|
9939
|
+
export declare type OpenLineageRunEventType = 'START' | 'RUNNING' | 'COMPLETE' | 'ABORT' | 'FAIL' | 'OTHER';
|
|
9940
|
+
|
|
9941
|
+
export declare interface OpenLineageTransformation {
|
|
9942
|
+
type: 'DIRECT' | string;
|
|
9943
|
+
subtype: 'IDENTITY' | 'TRANSFORMATION' | 'AGGREGATION' | string;
|
|
9944
|
+
description?: string;
|
|
9945
|
+
masking?: boolean;
|
|
9946
|
+
}
|
|
9947
|
+
|
|
9948
|
+
export declare interface OpenLineageWarning {
|
|
9949
|
+
code: string;
|
|
9950
|
+
message: string;
|
|
9951
|
+
}
|
|
9952
|
+
|
|
9863
9953
|
/**
|
|
9864
9954
|
* Operator
|
|
9865
9955
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -3375,6 +3375,9 @@ declare const _default: {
|
|
|
3375
3375
|
lineage: typeof lineage;
|
|
3376
3376
|
lineageWithSchema: typeof lineageWithSchema;
|
|
3377
3377
|
getSourceTables: typeof getSourceTables;
|
|
3378
|
+
openLineageColumnLineage: typeof openLineageColumnLineage;
|
|
3379
|
+
openLineageJobEvent: typeof openLineageJobEvent;
|
|
3380
|
+
openLineageRunEvent: typeof openLineageRunEvent;
|
|
3378
3381
|
diff: typeof diff;
|
|
3379
3382
|
hasChanges: typeof hasChanges;
|
|
3380
3383
|
changesOnly: typeof changesOnly;
|
|
@@ -9860,6 +9863,93 @@ declare type OpenJSONColumnDef = {
|
|
|
9860
9863
|
data_type?: DataType | null;
|
|
9861
9864
|
};
|
|
9862
9865
|
|
|
9866
|
+
/**
|
|
9867
|
+
* Build a standalone OpenLineage columnLineage facet with input/output datasets.
|
|
9868
|
+
*/
|
|
9869
|
+
export declare function openLineageColumnLineage(sql: string, options: OpenLineageOptions): OpenLineageColumnLineageResult;
|
|
9870
|
+
|
|
9871
|
+
export declare interface OpenLineageColumnLineageFacet {
|
|
9872
|
+
_producer: string;
|
|
9873
|
+
_schemaURL: string;
|
|
9874
|
+
fields: Record<string, OpenLineageColumnLineageField>;
|
|
9875
|
+
}
|
|
9876
|
+
|
|
9877
|
+
export declare interface OpenLineageColumnLineageField {
|
|
9878
|
+
inputFields: OpenLineageInputField[];
|
|
9879
|
+
}
|
|
9880
|
+
|
|
9881
|
+
export declare interface OpenLineageColumnLineageResult {
|
|
9882
|
+
success: boolean;
|
|
9883
|
+
facet?: OpenLineageColumnLineageFacet;
|
|
9884
|
+
inputs?: OpenLineageDataset[];
|
|
9885
|
+
outputs?: OpenLineageDataset[];
|
|
9886
|
+
warnings: OpenLineageWarning[];
|
|
9887
|
+
error?: string;
|
|
9888
|
+
}
|
|
9889
|
+
|
|
9890
|
+
export declare interface OpenLineageDataset {
|
|
9891
|
+
namespace: string;
|
|
9892
|
+
name: string;
|
|
9893
|
+
facets?: Record<string, unknown>;
|
|
9894
|
+
}
|
|
9895
|
+
|
|
9896
|
+
export declare interface OpenLineageDatasetId {
|
|
9897
|
+
namespace: string;
|
|
9898
|
+
name: string;
|
|
9899
|
+
}
|
|
9900
|
+
|
|
9901
|
+
export declare interface OpenLineageEventResult {
|
|
9902
|
+
success: boolean;
|
|
9903
|
+
event?: Record<string, unknown>;
|
|
9904
|
+
warnings: OpenLineageWarning[];
|
|
9905
|
+
error?: string;
|
|
9906
|
+
}
|
|
9907
|
+
|
|
9908
|
+
export declare interface OpenLineageInputField {
|
|
9909
|
+
namespace: string;
|
|
9910
|
+
name: string;
|
|
9911
|
+
field: string;
|
|
9912
|
+
transformations?: OpenLineageTransformation[];
|
|
9913
|
+
}
|
|
9914
|
+
|
|
9915
|
+
/**
|
|
9916
|
+
* Build an OpenLineage JobEvent payload. This does not send the event.
|
|
9917
|
+
*/
|
|
9918
|
+
export declare function openLineageJobEvent(sql: string, options: OpenLineageOptions): OpenLineageEventResult;
|
|
9919
|
+
|
|
9920
|
+
export declare interface OpenLineageOptions {
|
|
9921
|
+
dialect?: string;
|
|
9922
|
+
producer: string;
|
|
9923
|
+
datasetNamespace?: string;
|
|
9924
|
+
datasetMappings?: Record<string, OpenLineageDatasetId>;
|
|
9925
|
+
outputDataset?: OpenLineageDatasetId;
|
|
9926
|
+
schema?: Schema;
|
|
9927
|
+
jobNamespace?: string;
|
|
9928
|
+
jobName?: string;
|
|
9929
|
+
eventTime?: string;
|
|
9930
|
+
runId?: string;
|
|
9931
|
+
eventType?: OpenLineageRunEventType;
|
|
9932
|
+
}
|
|
9933
|
+
|
|
9934
|
+
/**
|
|
9935
|
+
* Build an OpenLineage RunEvent payload. This does not send the event.
|
|
9936
|
+
*/
|
|
9937
|
+
export declare function openLineageRunEvent(sql: string, options: OpenLineageOptions): OpenLineageEventResult;
|
|
9938
|
+
|
|
9939
|
+
export declare type OpenLineageRunEventType = 'START' | 'RUNNING' | 'COMPLETE' | 'ABORT' | 'FAIL' | 'OTHER';
|
|
9940
|
+
|
|
9941
|
+
export declare interface OpenLineageTransformation {
|
|
9942
|
+
type: 'DIRECT' | string;
|
|
9943
|
+
subtype: 'IDENTITY' | 'TRANSFORMATION' | 'AGGREGATION' | string;
|
|
9944
|
+
description?: string;
|
|
9945
|
+
masking?: boolean;
|
|
9946
|
+
}
|
|
9947
|
+
|
|
9948
|
+
export declare interface OpenLineageWarning {
|
|
9949
|
+
code: string;
|
|
9950
|
+
message: string;
|
|
9951
|
+
}
|
|
9952
|
+
|
|
9863
9953
|
/**
|
|
9864
9954
|
* Operator
|
|
9865
9955
|
*/
|
package/dist/index.js
CHANGED
|
@@ -2388,6 +2388,87 @@ function lineage_sql_with_schema$1(sql, column, schema_json, dialect, trim_selec
|
|
|
2388
2388
|
}
|
|
2389
2389
|
}
|
|
2390
2390
|
|
|
2391
|
+
/**
|
|
2392
|
+
* Build an OpenLineage columnLineage facet and dataset payload.
|
|
2393
|
+
* @param {string} sql
|
|
2394
|
+
* @param {string} options_json
|
|
2395
|
+
* @returns {string}
|
|
2396
|
+
*/
|
|
2397
|
+
function openlineage_column_lineage$1(sql, options_json) {
|
|
2398
|
+
let deferred3_0;
|
|
2399
|
+
let deferred3_1;
|
|
2400
|
+
try {
|
|
2401
|
+
const retptr = wasm$3.__wbindgen_add_to_stack_pointer(-16);
|
|
2402
|
+
const ptr0 = passStringToWasm0(sql, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2403
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2404
|
+
const ptr1 = passStringToWasm0(options_json, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2405
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2406
|
+
wasm$3.openlineage_column_lineage(retptr, ptr0, len0, ptr1, len1);
|
|
2407
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2408
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2409
|
+
deferred3_0 = r0;
|
|
2410
|
+
deferred3_1 = r1;
|
|
2411
|
+
return getStringFromWasm0(r0, r1);
|
|
2412
|
+
} finally {
|
|
2413
|
+
wasm$3.__wbindgen_add_to_stack_pointer(16);
|
|
2414
|
+
wasm$3.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* Build an OpenLineage JobEvent payload. This does not send the event.
|
|
2420
|
+
* @param {string} sql
|
|
2421
|
+
* @param {string} options_json
|
|
2422
|
+
* @returns {string}
|
|
2423
|
+
*/
|
|
2424
|
+
function openlineage_job_event$1(sql, options_json) {
|
|
2425
|
+
let deferred3_0;
|
|
2426
|
+
let deferred3_1;
|
|
2427
|
+
try {
|
|
2428
|
+
const retptr = wasm$3.__wbindgen_add_to_stack_pointer(-16);
|
|
2429
|
+
const ptr0 = passStringToWasm0(sql, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2430
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2431
|
+
const ptr1 = passStringToWasm0(options_json, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2432
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2433
|
+
wasm$3.openlineage_job_event(retptr, ptr0, len0, ptr1, len1);
|
|
2434
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2435
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2436
|
+
deferred3_0 = r0;
|
|
2437
|
+
deferred3_1 = r1;
|
|
2438
|
+
return getStringFromWasm0(r0, r1);
|
|
2439
|
+
} finally {
|
|
2440
|
+
wasm$3.__wbindgen_add_to_stack_pointer(16);
|
|
2441
|
+
wasm$3.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
/**
|
|
2446
|
+
* Build an OpenLineage RunEvent payload. This does not send the event.
|
|
2447
|
+
* @param {string} sql
|
|
2448
|
+
* @param {string} options_json
|
|
2449
|
+
* @returns {string}
|
|
2450
|
+
*/
|
|
2451
|
+
function openlineage_run_event$1(sql, options_json) {
|
|
2452
|
+
let deferred3_0;
|
|
2453
|
+
let deferred3_1;
|
|
2454
|
+
try {
|
|
2455
|
+
const retptr = wasm$3.__wbindgen_add_to_stack_pointer(-16);
|
|
2456
|
+
const ptr0 = passStringToWasm0(sql, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2457
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2458
|
+
const ptr1 = passStringToWasm0(options_json, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
|
|
2459
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2460
|
+
wasm$3.openlineage_run_event(retptr, ptr0, len0, ptr1, len1);
|
|
2461
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2462
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2463
|
+
deferred3_0 = r0;
|
|
2464
|
+
deferred3_1 = r1;
|
|
2465
|
+
return getStringFromWasm0(r0, r1);
|
|
2466
|
+
} finally {
|
|
2467
|
+
wasm$3.__wbindgen_add_to_stack_pointer(16);
|
|
2468
|
+
wasm$3.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2391
2472
|
/**
|
|
2392
2473
|
* Parse SQL into an AST (returned as JSON).
|
|
2393
2474
|
*
|
|
@@ -3576,6 +3657,9 @@ const get_dialects = __vite__wasmModule.get_dialects;
|
|
|
3576
3657
|
const get_dialects_value = __vite__wasmModule.get_dialects_value;
|
|
3577
3658
|
const lineage_sql = __vite__wasmModule.lineage_sql;
|
|
3578
3659
|
const lineage_sql_with_schema = __vite__wasmModule.lineage_sql_with_schema;
|
|
3660
|
+
const openlineage_column_lineage = __vite__wasmModule.openlineage_column_lineage;
|
|
3661
|
+
const openlineage_job_event = __vite__wasmModule.openlineage_job_event;
|
|
3662
|
+
const openlineage_run_event = __vite__wasmModule.openlineage_run_event;
|
|
3579
3663
|
const parse$1 = __vite__wasmModule.parse;
|
|
3580
3664
|
const parse_value = __vite__wasmModule.parse_value;
|
|
3581
3665
|
const plan$1 = __vite__wasmModule.plan;
|
|
@@ -3768,6 +3852,9 @@ const wasm$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
3768
3852
|
lineage_sql,
|
|
3769
3853
|
lineage_sql_with_schema,
|
|
3770
3854
|
memory,
|
|
3855
|
+
openlineage_column_lineage,
|
|
3856
|
+
openlineage_job_event,
|
|
3857
|
+
openlineage_run_event,
|
|
3771
3858
|
parse: parse$1,
|
|
3772
3859
|
parse_value,
|
|
3773
3860
|
plan: plan$1,
|
|
@@ -3954,6 +4041,9 @@ const wasmModule = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty
|
|
|
3954
4041
|
get_dialects_value: get_dialects_value$1,
|
|
3955
4042
|
lineage_sql: lineage_sql$1,
|
|
3956
4043
|
lineage_sql_with_schema: lineage_sql_with_schema$1,
|
|
4044
|
+
openlineage_column_lineage: openlineage_column_lineage$1,
|
|
4045
|
+
openlineage_job_event: openlineage_job_event$1,
|
|
4046
|
+
openlineage_run_event: openlineage_run_event$1,
|
|
3957
4047
|
parse: parse$2,
|
|
3958
4048
|
parse_value: parse_value$1,
|
|
3959
4049
|
plan: plan$2,
|
|
@@ -5608,6 +5698,35 @@ function getSourceTables(column, sql, dialect = "generic") {
|
|
|
5608
5698
|
return JSON.parse(resultJson);
|
|
5609
5699
|
}
|
|
5610
5700
|
|
|
5701
|
+
function normalizeOptions(options) {
|
|
5702
|
+
return {
|
|
5703
|
+
dialect: "generic",
|
|
5704
|
+
datasetMappings: {},
|
|
5705
|
+
...options
|
|
5706
|
+
};
|
|
5707
|
+
}
|
|
5708
|
+
function openLineageColumnLineage(sql, options) {
|
|
5709
|
+
const resultJson = openlineage_column_lineage$1(
|
|
5710
|
+
sql,
|
|
5711
|
+
JSON.stringify(normalizeOptions(options))
|
|
5712
|
+
);
|
|
5713
|
+
return JSON.parse(resultJson);
|
|
5714
|
+
}
|
|
5715
|
+
function openLineageJobEvent(sql, options) {
|
|
5716
|
+
const resultJson = openlineage_job_event$1(
|
|
5717
|
+
sql,
|
|
5718
|
+
JSON.stringify(normalizeOptions(options))
|
|
5719
|
+
);
|
|
5720
|
+
return JSON.parse(resultJson);
|
|
5721
|
+
}
|
|
5722
|
+
function openLineageRunEvent(sql, options) {
|
|
5723
|
+
const resultJson = openlineage_run_event$1(
|
|
5724
|
+
sql,
|
|
5725
|
+
JSON.stringify(normalizeOptions(options))
|
|
5726
|
+
);
|
|
5727
|
+
return JSON.parse(resultJson);
|
|
5728
|
+
}
|
|
5729
|
+
|
|
5611
5730
|
function diff(source, target, dialect = "generic", options = {}) {
|
|
5612
5731
|
const { deltaOnly = false, f = 0.6, t = 0.6 } = options;
|
|
5613
5732
|
const resultJson = diff_sql$1(source, target, dialect, deltaOnly, f, t);
|
|
@@ -5903,6 +6022,9 @@ const index = {
|
|
|
5903
6022
|
lineage: lineage,
|
|
5904
6023
|
lineageWithSchema: lineageWithSchema,
|
|
5905
6024
|
getSourceTables: getSourceTables,
|
|
6025
|
+
openLineageColumnLineage: openLineageColumnLineage,
|
|
6026
|
+
openLineageJobEvent: openLineageJobEvent,
|
|
6027
|
+
openLineageRunEvent: openLineageRunEvent,
|
|
5906
6028
|
diff: diff,
|
|
5907
6029
|
hasChanges: hasChanges,
|
|
5908
6030
|
changesOnly: changesOnly,
|
|
@@ -5911,4 +6033,4 @@ const index = {
|
|
|
5911
6033
|
Polyglot
|
|
5912
6034
|
};
|
|
5913
6035
|
|
|
5914
|
-
export { CaseBuilder, DeleteBuilder, Dialect, Expr, InsertBuilder, MergeBuilder, Polyglot, SelectBuilder, SetOpBuilder, UpdateBuilder, ValidationSeverity, WindowDefBuilder, abs, alias, and, annotateTypes, index$1 as ast, avg, boolean, caseOf, caseWhen, cast, ceil, changesOnly, coalesce, col, concatWs, condition, count, countDistinct, currentDate, currentTime, currentTimestamp, index as default, del, deleteFrom, denseRank, diff, except, exp, extract, findAll, floor, format, formatWithOptions, func, generate, getColumns, getDialects, getInferredType, getSourceTables, getVersion, greatest, hasChanges, ifNull, init, initcap, insert, insertInto, intersect, isColumn, isFunction, isInitialized, isLiteral, isSelect, least, length, lineage, lineageWithSchema, lit, ln, lower, ltrim, max, mergeInto, min, not, nullIf, or, parse, plan, power, rank, renameColumns, replace, reverse, round, rowNumber, rtrim, select, sign, sqlExpr, sqlNull, sqrt, star, subquery, substring, sum, table, tokenize, transform, transpile, trim, union, unionAll, update, upper, validate, validateWithSchema, walk };
|
|
6036
|
+
export { CaseBuilder, DeleteBuilder, Dialect, Expr, InsertBuilder, MergeBuilder, Polyglot, SelectBuilder, SetOpBuilder, UpdateBuilder, ValidationSeverity, WindowDefBuilder, abs, alias, and, annotateTypes, index$1 as ast, avg, boolean, caseOf, caseWhen, cast, ceil, changesOnly, coalesce, col, concatWs, condition, count, countDistinct, currentDate, currentTime, currentTimestamp, index as default, del, deleteFrom, denseRank, diff, except, exp, extract, findAll, floor, format, formatWithOptions, func, generate, getColumns, getDialects, getInferredType, getSourceTables, getVersion, greatest, hasChanges, ifNull, init, initcap, insert, insertInto, intersect, isColumn, isFunction, isInitialized, isLiteral, isSelect, least, length, lineage, lineageWithSchema, lit, ln, lower, ltrim, max, mergeInto, min, not, nullIf, openLineageColumnLineage, openLineageJobEvent, openLineageRunEvent, or, parse, plan, power, rank, renameColumns, replace, reverse, round, rowNumber, rtrim, select, sign, sqlExpr, sqlNull, sqrt, star, subquery, substring, sum, table, tokenize, transform, transpile, trim, union, unionAll, update, upper, validate, validateWithSchema, walk };
|
|
Binary file
|