@polyglot-sql/sdk 0.3.10 → 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/dist/index.cjs CHANGED
@@ -96,32 +96,35 @@ class WasmCaseBuilder {
96
96
  return this;
97
97
  }
98
98
  /**
99
- * Generate SQL string (generic dialect).
99
+ * Generate SQL string for the given dialect.
100
+ * @param {string} dialect
100
101
  * @returns {string}
101
102
  */
102
- to_sql() {
103
- let deferred2_0;
104
- let deferred2_1;
103
+ to_sql(dialect) {
104
+ let deferred3_0;
105
+ let deferred3_1;
105
106
  try {
106
107
  const retptr = wasm$3.__wbindgen_add_to_stack_pointer(-16);
107
- wasm$3.wasmcasebuilder_to_sql(retptr, this.__wbg_ptr);
108
+ const ptr0 = passStringToWasm0(dialect, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
109
+ const len0 = WASM_VECTOR_LEN;
110
+ wasm$3.wasmcasebuilder_to_sql(retptr, this.__wbg_ptr, ptr0, len0);
108
111
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
109
112
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
110
113
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
111
114
  var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
112
- var ptr1 = r0;
113
- var len1 = r1;
115
+ var ptr2 = r0;
116
+ var len2 = r1;
114
117
  if (r3) {
115
- ptr1 = 0;
116
- len1 = 0;
118
+ ptr2 = 0;
119
+ len2 = 0;
117
120
  throw takeObject(r2);
118
121
  }
119
- deferred2_0 = ptr1;
120
- deferred2_1 = len1;
121
- return getStringFromWasm0(ptr1, len1);
122
+ deferred3_0 = ptr2;
123
+ deferred3_1 = len2;
124
+ return getStringFromWasm0(ptr2, len2);
122
125
  } finally {
123
126
  wasm$3.__wbindgen_add_to_stack_pointer(16);
124
- wasm$3.__wbindgen_export4(deferred2_0, deferred2_1, 1);
127
+ wasm$3.__wbindgen_export4(deferred3_0, deferred3_1, 1);
125
128
  }
126
129
  }
127
130
  /**
@@ -502,32 +505,35 @@ class WasmExpr {
502
505
  }
503
506
  }
504
507
  /**
505
- * Generate SQL string (generic dialect).
508
+ * Generate SQL string for the given dialect.
509
+ * @param {string} dialect
506
510
  * @returns {string}
507
511
  */
508
- to_sql() {
509
- let deferred2_0;
510
- let deferred2_1;
512
+ to_sql(dialect) {
513
+ let deferred3_0;
514
+ let deferred3_1;
511
515
  try {
512
516
  const retptr = wasm$3.__wbindgen_add_to_stack_pointer(-16);
513
- wasm$3.wasmexpr_to_sql(retptr, this.__wbg_ptr);
517
+ const ptr0 = passStringToWasm0(dialect, wasm$3.__wbindgen_export, wasm$3.__wbindgen_export2);
518
+ const len0 = WASM_VECTOR_LEN;
519
+ wasm$3.wasmexpr_to_sql(retptr, this.__wbg_ptr, ptr0, len0);
514
520
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
515
521
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
516
522
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
517
523
  var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
518
- var ptr1 = r0;
519
- var len1 = r1;
524
+ var ptr2 = r0;
525
+ var len2 = r1;
520
526
  if (r3) {
521
- ptr1 = 0;
522
- len1 = 0;
527
+ ptr2 = 0;
528
+ len2 = 0;
523
529
  throw takeObject(r2);
524
530
  }
525
- deferred2_0 = ptr1;
526
- deferred2_1 = len1;
527
- return getStringFromWasm0(ptr1, len1);
531
+ deferred3_0 = ptr2;
532
+ deferred3_1 = len2;
533
+ return getStringFromWasm0(ptr2, len2);
528
534
  } finally {
529
535
  wasm$3.__wbindgen_add_to_stack_pointer(16);
530
- wasm$3.__wbindgen_export4(deferred2_0, deferred2_1, 1);
536
+ wasm$3.__wbindgen_export4(deferred3_0, deferred3_1, 1);
531
537
  }
532
538
  }
533
539
  /**
@@ -2031,6 +2037,66 @@ function lineage_sql_with_schema$1(sql, column, schema_json, dialect, trim_selec
2031
2037
  wasm$3.__wbindgen_export4(deferred5_0, deferred5_1, 1);
2032
2038
  }
2033
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
+ }
2034
2100
  function parse$2(sql, dialect) {
2035
2101
  let deferred3_0;
2036
2102
  let deferred3_1;
@@ -2944,6 +3010,9 @@ async function __polyglot_init_wasm() {
2944
3010
  get_dialects_value = __vite__wasmModule.get_dialects_value;
2945
3011
  lineage_sql = __vite__wasmModule.lineage_sql;
2946
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;
2947
3016
  parse$1 = __vite__wasmModule.parse;
2948
3017
  parse_value = __vite__wasmModule.parse_value;
2949
3018
  plan$1 = __vite__wasmModule.plan;
@@ -3132,6 +3201,9 @@ let get_dialects;
3132
3201
  let get_dialects_value;
3133
3202
  let lineage_sql;
3134
3203
  let lineage_sql_with_schema;
3204
+ let openlineage_column_lineage;
3205
+ let openlineage_job_event;
3206
+ let openlineage_run_event;
3135
3207
  let parse$1;
3136
3208
  let parse_value;
3137
3209
  let plan$1;
@@ -3323,6 +3395,9 @@ const wasm$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
3323
3395
  lineage_sql,
3324
3396
  lineage_sql_with_schema,
3325
3397
  memory,
3398
+ openlineage_column_lineage,
3399
+ openlineage_job_event,
3400
+ openlineage_run_event,
3326
3401
  parse: parse$1,
3327
3402
  parse_value,
3328
3403
  plan: plan$1,
@@ -3504,6 +3579,9 @@ const wasmModule = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
3504
3579
  get_dialects_value: get_dialects_value$1,
3505
3580
  lineage_sql: lineage_sql$1,
3506
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,
3507
3585
  parse: parse$2,
3508
3586
  parse_value: parse_value$1,
3509
3587
  plan: plan$2,
@@ -4381,9 +4459,9 @@ class Expr {
4381
4459
  return new Expr(this._w.desc());
4382
4460
  }
4383
4461
  // -- Output --
4384
- /** Generate SQL string (generic dialect). */
4385
- toSql() {
4386
- return this._w.to_sql();
4462
+ /** Generate SQL string. Defaults to generic dialect. */
4463
+ toSql(dialect = "generic") {
4464
+ return this._w.to_sql(dialect);
4387
4465
  }
4388
4466
  /** Return the expression AST as a plain JS object. */
4389
4467
  toJSON() {
@@ -4919,9 +4997,9 @@ class CaseBuilder {
4919
4997
  build() {
4920
4998
  return new Expr(this._w.build_expr());
4921
4999
  }
4922
- /** Generate SQL string (generic dialect). */
4923
- toSql() {
4924
- return this._w.to_sql();
5000
+ /** Generate SQL string. Defaults to generic dialect. */
5001
+ toSql(dialect = "generic") {
5002
+ return this._w.to_sql(dialect);
4925
5003
  }
4926
5004
  }
4927
5005
  function caseWhen() {
@@ -5146,6 +5224,34 @@ function getSourceTables(column, sql, dialect = "generic") {
5146
5224
  const resultJson = source_tables$1(sql, column, dialect);
5147
5225
  return JSON.parse(resultJson);
5148
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
+ }
5149
5255
  function diff(source, target, dialect = "generic", options = {}) {
5150
5256
  const { deltaOnly = false, f = 0.6, t = 0.6 } = options;
5151
5257
  const resultJson = diff_sql$1(source, target, dialect, deltaOnly, f, t);
@@ -5439,6 +5545,9 @@ const index = {
5439
5545
  lineage,
5440
5546
  lineageWithSchema,
5441
5547
  getSourceTables,
5548
+ openLineageColumnLineage,
5549
+ openLineageJobEvent,
5550
+ openLineageRunEvent,
5442
5551
  diff,
5443
5552
  hasChanges,
5444
5553
  changesOnly,
@@ -5524,6 +5633,9 @@ exports.mergeInto = mergeInto;
5524
5633
  exports.min = min;
5525
5634
  exports.not = not;
5526
5635
  exports.nullIf = nullIf;
5636
+ exports.openLineageColumnLineage = openLineageColumnLineage;
5637
+ exports.openLineageJobEvent = openLineageJobEvent;
5638
+ exports.openLineageRunEvent = openLineageRunEvent;
5527
5639
  exports.or = or;
5528
5640
  exports.parse = parse;
5529
5641
  exports.plan = plan;
package/dist/index.d.cts CHANGED
@@ -1384,8 +1384,8 @@ export declare class CaseBuilder {
1384
1384
  else_(result: ExprInput): this;
1385
1385
  /** Build the CASE expression as an Expr. */
1386
1386
  build(): Expr;
1387
- /** Generate SQL string (generic dialect). */
1388
- toSql(): string;
1387
+ /** Generate SQL string. Defaults to generic dialect. */
1388
+ toSql(dialect?: string): string;
1389
1389
  }
1390
1390
 
1391
1391
  /** Create a simple CASE builder (CASE operand WHEN value THEN ...). */
@@ -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;
@@ -4219,8 +4222,8 @@ export declare class Expr {
4219
4222
  cast(to: string): Expr;
4220
4223
  asc(): Expr;
4221
4224
  desc(): Expr;
4222
- /** Generate SQL string (generic dialect). */
4223
- toSql(): string;
4225
+ /** Generate SQL string. Defaults to generic dialect. */
4226
+ toSql(dialect?: string): string;
4224
4227
  /** Return the expression AST as a plain JS object. */
4225
4228
  toJSON(): any;
4226
4229
  /** Free the underlying WASM handle. */
@@ -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
  */
@@ -14502,9 +14592,9 @@ declare class WasmCaseBuilder {
14502
14592
  */
14503
14593
  constructor();
14504
14594
  /**
14505
- * Generate SQL string (generic dialect).
14595
+ * Generate SQL string for the given dialect.
14506
14596
  */
14507
- to_sql(): string;
14597
+ to_sql(dialect: string): string;
14508
14598
  /**
14509
14599
  * Add a WHEN condition THEN result branch.
14510
14600
  */
@@ -14648,9 +14738,9 @@ declare class WasmExpr {
14648
14738
  */
14649
14739
  to_json(): any;
14650
14740
  /**
14651
- * Generate SQL string (generic dialect).
14741
+ * Generate SQL string for the given dialect.
14652
14742
  */
14653
- to_sql(): string;
14743
+ to_sql(dialect: string): string;
14654
14744
  /**
14655
14745
  * Produce `self XOR other`.
14656
14746
  */
package/dist/index.d.ts CHANGED
@@ -1384,8 +1384,8 @@ export declare class CaseBuilder {
1384
1384
  else_(result: ExprInput): this;
1385
1385
  /** Build the CASE expression as an Expr. */
1386
1386
  build(): Expr;
1387
- /** Generate SQL string (generic dialect). */
1388
- toSql(): string;
1387
+ /** Generate SQL string. Defaults to generic dialect. */
1388
+ toSql(dialect?: string): string;
1389
1389
  }
1390
1390
 
1391
1391
  /** Create a simple CASE builder (CASE operand WHEN value THEN ...). */
@@ -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;
@@ -4219,8 +4222,8 @@ export declare class Expr {
4219
4222
  cast(to: string): Expr;
4220
4223
  asc(): Expr;
4221
4224
  desc(): Expr;
4222
- /** Generate SQL string (generic dialect). */
4223
- toSql(): string;
4225
+ /** Generate SQL string. Defaults to generic dialect. */
4226
+ toSql(dialect?: string): string;
4224
4227
  /** Return the expression AST as a plain JS object. */
4225
4228
  toJSON(): any;
4226
4229
  /** Free the underlying WASM handle. */
@@ -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
  */
@@ -14502,9 +14592,9 @@ declare class WasmCaseBuilder {
14502
14592
  */
14503
14593
  constructor();
14504
14594
  /**
14505
- * Generate SQL string (generic dialect).
14595
+ * Generate SQL string for the given dialect.
14506
14596
  */
14507
- to_sql(): string;
14597
+ to_sql(dialect: string): string;
14508
14598
  /**
14509
14599
  * Add a WHEN condition THEN result branch.
14510
14600
  */
@@ -14648,9 +14738,9 @@ declare class WasmExpr {
14648
14738
  */
14649
14739
  to_json(): any;
14650
14740
  /**
14651
- * Generate SQL string (generic dialect).
14741
+ * Generate SQL string for the given dialect.
14652
14742
  */
14653
- to_sql(): string;
14743
+ to_sql(dialect: string): string;
14654
14744
  /**
14655
14745
  * Produce `self XOR other`.
14656
14746
  */