@dataform/core 3.0.12 → 3.0.14

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/bundle.d.ts CHANGED
@@ -4,27 +4,6 @@ declare function compile(code: string, path: string): string;
4
4
 
5
5
  declare function main(coreExecutionRequest: Uint8Array | string): Uint8Array | string;
6
6
 
7
- interface ICommonContext {
8
- self: () => string;
9
- name: () => string;
10
- ref: (ref: Resolvable | string[], ...rest: string[]) => string;
11
- resolve: (ref: Resolvable | string[], ...rest: string[]) => string;
12
- schema: () => string;
13
- database: () => string;
14
- }
15
- interface INamedConfig {
16
- type?: string;
17
- name?: string;
18
- }
19
- interface ITarget {
20
- database?: string;
21
- schema?: string;
22
- name?: string;
23
- includeDependentAssertions?: boolean;
24
- }
25
- declare type Resolvable = string | ITarget;
26
- declare type Contextable<Context, T> = T | ((ctx: Context) => T);
27
-
28
7
  /** Namespace dataform. */
29
8
  namespace dataform {
30
9
 
@@ -2112,6 +2091,12 @@ namespace dataform {
2112
2091
 
2113
2092
  /** DataPreparationConfig description */
2114
2093
  description?: (string|null);
2094
+
2095
+ /** DataPreparationConfig errorTable */
2096
+ errorTable?: (dataform.ActionConfig.DataPreparationConfig.IErrorTableConfig|null);
2097
+
2098
+ /** DataPreparationConfig loadMode */
2099
+ loadMode?: (dataform.ActionConfig.ILoadModeConfig|null);
2115
2100
  }
2116
2101
 
2117
2102
  /** Represents a DataPreparationConfig. */
@@ -2141,6 +2126,12 @@ namespace dataform {
2141
2126
  /** DataPreparationConfig description. */
2142
2127
  public description: string;
2143
2128
 
2129
+ /** DataPreparationConfig errorTable. */
2130
+ public errorTable?: (dataform.ActionConfig.DataPreparationConfig.IErrorTableConfig|null);
2131
+
2132
+ /** DataPreparationConfig loadMode. */
2133
+ public loadMode?: (dataform.ActionConfig.ILoadModeConfig|null);
2134
+
2144
2135
  /**
2145
2136
  * Creates a new DataPreparationConfig instance using the specified properties.
2146
2137
  * @param [properties] Properties to set
@@ -2218,6 +2209,235 @@ namespace dataform {
2218
2209
  */
2219
2210
  public static getTypeUrl(typeUrlPrefix?: string): string;
2220
2211
  }
2212
+
2213
+ namespace DataPreparationConfig {
2214
+
2215
+ /** Properties of an ErrorTableConfig. */
2216
+ interface IErrorTableConfig {
2217
+
2218
+ /** ErrorTableConfig name */
2219
+ name?: (string|null);
2220
+
2221
+ /** ErrorTableConfig dataset */
2222
+ dataset?: (string|null);
2223
+
2224
+ /** ErrorTableConfig project */
2225
+ project?: (string|null);
2226
+
2227
+ /** ErrorTableConfig retentionDays */
2228
+ retentionDays?: (number|null);
2229
+ }
2230
+
2231
+ /** Represents an ErrorTableConfig. */
2232
+ class ErrorTableConfig implements IErrorTableConfig {
2233
+
2234
+ /**
2235
+ * Constructs a new ErrorTableConfig.
2236
+ * @param [properties] Properties to set
2237
+ */
2238
+ constructor(properties?: dataform.ActionConfig.DataPreparationConfig.IErrorTableConfig);
2239
+
2240
+ /** ErrorTableConfig name. */
2241
+ public name: string;
2242
+
2243
+ /** ErrorTableConfig dataset. */
2244
+ public dataset: string;
2245
+
2246
+ /** ErrorTableConfig project. */
2247
+ public project: string;
2248
+
2249
+ /** ErrorTableConfig retentionDays. */
2250
+ public retentionDays: number;
2251
+
2252
+ /**
2253
+ * Creates a new ErrorTableConfig instance using the specified properties.
2254
+ * @param [properties] Properties to set
2255
+ * @returns ErrorTableConfig instance
2256
+ */
2257
+ public static create(properties?: dataform.ActionConfig.DataPreparationConfig.IErrorTableConfig): dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig;
2258
+
2259
+ /**
2260
+ * Encodes the specified ErrorTableConfig message. Does not implicitly {@link dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.verify|verify} messages.
2261
+ * @param message ErrorTableConfig message or plain object to encode
2262
+ * @param [writer] Writer to encode to
2263
+ * @returns Writer
2264
+ */
2265
+ public static encode(message: dataform.ActionConfig.DataPreparationConfig.IErrorTableConfig, writer?: $protobuf.Writer): $protobuf.Writer;
2266
+
2267
+ /**
2268
+ * Encodes the specified ErrorTableConfig message, length delimited. Does not implicitly {@link dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig.verify|verify} messages.
2269
+ * @param message ErrorTableConfig message or plain object to encode
2270
+ * @param [writer] Writer to encode to
2271
+ * @returns Writer
2272
+ */
2273
+ public static encodeDelimited(message: dataform.ActionConfig.DataPreparationConfig.IErrorTableConfig, writer?: $protobuf.Writer): $protobuf.Writer;
2274
+
2275
+ /**
2276
+ * Decodes an ErrorTableConfig message from the specified reader or buffer.
2277
+ * @param reader Reader or buffer to decode from
2278
+ * @param [length] Message length if known beforehand
2279
+ * @returns ErrorTableConfig
2280
+ * @throws {Error} If the payload is not a reader or valid buffer
2281
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2282
+ */
2283
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig;
2284
+
2285
+ /**
2286
+ * Decodes an ErrorTableConfig message from the specified reader or buffer, length delimited.
2287
+ * @param reader Reader or buffer to decode from
2288
+ * @returns ErrorTableConfig
2289
+ * @throws {Error} If the payload is not a reader or valid buffer
2290
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2291
+ */
2292
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig;
2293
+
2294
+ /**
2295
+ * Verifies an ErrorTableConfig message.
2296
+ * @param message Plain object to verify
2297
+ * @returns `null` if valid, otherwise the reason why it is not
2298
+ */
2299
+ public static verify(message: { [k: string]: any }): (string|null);
2300
+
2301
+ /**
2302
+ * Creates an ErrorTableConfig message from a plain object. Also converts values to their respective internal types.
2303
+ * @param object Plain object
2304
+ * @returns ErrorTableConfig
2305
+ */
2306
+ public static fromObject(object: { [k: string]: any }): dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig;
2307
+
2308
+ /**
2309
+ * Creates a plain object from an ErrorTableConfig message. Also converts values to other types if specified.
2310
+ * @param message ErrorTableConfig
2311
+ * @param [options] Conversion options
2312
+ * @returns Plain object
2313
+ */
2314
+ public static toObject(message: dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
2315
+
2316
+ /**
2317
+ * Converts this ErrorTableConfig to JSON.
2318
+ * @returns JSON object
2319
+ */
2320
+ public toJSON(): { [k: string]: any };
2321
+
2322
+ /**
2323
+ * Gets the default type url for ErrorTableConfig
2324
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2325
+ * @returns The default type url
2326
+ */
2327
+ public static getTypeUrl(typeUrlPrefix?: string): string;
2328
+ }
2329
+ }
2330
+
2331
+ /** Properties of a LoadModeConfig. */
2332
+ interface ILoadModeConfig {
2333
+
2334
+ /** LoadModeConfig mode */
2335
+ mode?: (dataform.ActionConfig.LoadMode|null);
2336
+
2337
+ /** LoadModeConfig incrementalColumn */
2338
+ incrementalColumn?: (string|null);
2339
+ }
2340
+
2341
+ /** Represents a LoadModeConfig. */
2342
+ class LoadModeConfig implements ILoadModeConfig {
2343
+
2344
+ /**
2345
+ * Constructs a new LoadModeConfig.
2346
+ * @param [properties] Properties to set
2347
+ */
2348
+ constructor(properties?: dataform.ActionConfig.ILoadModeConfig);
2349
+
2350
+ /** LoadModeConfig mode. */
2351
+ public mode: dataform.ActionConfig.LoadMode;
2352
+
2353
+ /** LoadModeConfig incrementalColumn. */
2354
+ public incrementalColumn: string;
2355
+
2356
+ /**
2357
+ * Creates a new LoadModeConfig instance using the specified properties.
2358
+ * @param [properties] Properties to set
2359
+ * @returns LoadModeConfig instance
2360
+ */
2361
+ public static create(properties?: dataform.ActionConfig.ILoadModeConfig): dataform.ActionConfig.LoadModeConfig;
2362
+
2363
+ /**
2364
+ * Encodes the specified LoadModeConfig message. Does not implicitly {@link dataform.ActionConfig.LoadModeConfig.verify|verify} messages.
2365
+ * @param message LoadModeConfig message or plain object to encode
2366
+ * @param [writer] Writer to encode to
2367
+ * @returns Writer
2368
+ */
2369
+ public static encode(message: dataform.ActionConfig.ILoadModeConfig, writer?: $protobuf.Writer): $protobuf.Writer;
2370
+
2371
+ /**
2372
+ * Encodes the specified LoadModeConfig message, length delimited. Does not implicitly {@link dataform.ActionConfig.LoadModeConfig.verify|verify} messages.
2373
+ * @param message LoadModeConfig message or plain object to encode
2374
+ * @param [writer] Writer to encode to
2375
+ * @returns Writer
2376
+ */
2377
+ public static encodeDelimited(message: dataform.ActionConfig.ILoadModeConfig, writer?: $protobuf.Writer): $protobuf.Writer;
2378
+
2379
+ /**
2380
+ * Decodes a LoadModeConfig message from the specified reader or buffer.
2381
+ * @param reader Reader or buffer to decode from
2382
+ * @param [length] Message length if known beforehand
2383
+ * @returns LoadModeConfig
2384
+ * @throws {Error} If the payload is not a reader or valid buffer
2385
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2386
+ */
2387
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): dataform.ActionConfig.LoadModeConfig;
2388
+
2389
+ /**
2390
+ * Decodes a LoadModeConfig message from the specified reader or buffer, length delimited.
2391
+ * @param reader Reader or buffer to decode from
2392
+ * @returns LoadModeConfig
2393
+ * @throws {Error} If the payload is not a reader or valid buffer
2394
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2395
+ */
2396
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): dataform.ActionConfig.LoadModeConfig;
2397
+
2398
+ /**
2399
+ * Verifies a LoadModeConfig message.
2400
+ * @param message Plain object to verify
2401
+ * @returns `null` if valid, otherwise the reason why it is not
2402
+ */
2403
+ public static verify(message: { [k: string]: any }): (string|null);
2404
+
2405
+ /**
2406
+ * Creates a LoadModeConfig message from a plain object. Also converts values to their respective internal types.
2407
+ * @param object Plain object
2408
+ * @returns LoadModeConfig
2409
+ */
2410
+ public static fromObject(object: { [k: string]: any }): dataform.ActionConfig.LoadModeConfig;
2411
+
2412
+ /**
2413
+ * Creates a plain object from a LoadModeConfig message. Also converts values to other types if specified.
2414
+ * @param message LoadModeConfig
2415
+ * @param [options] Conversion options
2416
+ * @returns Plain object
2417
+ */
2418
+ public static toObject(message: dataform.ActionConfig.LoadModeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
2419
+
2420
+ /**
2421
+ * Converts this LoadModeConfig to JSON.
2422
+ * @returns JSON object
2423
+ */
2424
+ public toJSON(): { [k: string]: any };
2425
+
2426
+ /**
2427
+ * Gets the default type url for LoadModeConfig
2428
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2429
+ * @returns The default type url
2430
+ */
2431
+ public static getTypeUrl(typeUrlPrefix?: string): string;
2432
+ }
2433
+
2434
+ /** LoadMode enum. */
2435
+ enum LoadMode {
2436
+ REPLACE_TABLE = 0,
2437
+ APPEND = 1,
2438
+ MAXIMUM = 2,
2439
+ UNIQUE = 3
2440
+ }
2221
2441
  }
2222
2442
 
2223
2443
  /** Properties of a NotebookRuntimeOptionsConfig. */
@@ -4334,6 +4554,18 @@ namespace dataform {
4334
4554
 
4335
4555
  /** DataPreparation dataPreparationYaml */
4336
4556
  dataPreparationYaml?: (string|null);
4557
+
4558
+ /** DataPreparation query */
4559
+ query?: (string|null);
4560
+
4561
+ /** DataPreparation errorTable */
4562
+ errorTable?: (dataform.ITarget|null);
4563
+
4564
+ /** DataPreparation errorTableRetentionDays */
4565
+ errorTableRetentionDays?: (number|null);
4566
+
4567
+ /** DataPreparation load */
4568
+ load?: (dataform.ILoadConfiguration|null);
4337
4569
  }
4338
4570
 
4339
4571
  /** Represents a DataPreparation. */
@@ -4370,7 +4602,22 @@ namespace dataform {
4370
4602
  public disabled: boolean;
4371
4603
 
4372
4604
  /** DataPreparation dataPreparationYaml. */
4373
- public dataPreparationYaml: string;
4605
+ public dataPreparationYaml?: (string|null);
4606
+
4607
+ /** DataPreparation query. */
4608
+ public query?: (string|null);
4609
+
4610
+ /** DataPreparation errorTable. */
4611
+ public errorTable?: (dataform.ITarget|null);
4612
+
4613
+ /** DataPreparation errorTableRetentionDays. */
4614
+ public errorTableRetentionDays: number;
4615
+
4616
+ /** DataPreparation load. */
4617
+ public load?: (dataform.ILoadConfiguration|null);
4618
+
4619
+ /** DataPreparation definition. */
4620
+ public definition?: ("dataPreparationYaml"|"query");
4374
4621
 
4375
4622
  /**
4376
4623
  * Creates a new DataPreparation instance using the specified properties.
@@ -4450,6 +4697,318 @@ namespace dataform {
4450
4697
  public static getTypeUrl(typeUrlPrefix?: string): string;
4451
4698
  }
4452
4699
 
4700
+ /** Properties of a LoadConfiguration. */
4701
+ interface ILoadConfiguration {
4702
+
4703
+ /** LoadConfiguration replace */
4704
+ replace?: (dataform.ISimpleLoadMode|null);
4705
+
4706
+ /** LoadConfiguration append */
4707
+ append?: (dataform.ISimpleLoadMode|null);
4708
+
4709
+ /** LoadConfiguration maximum */
4710
+ maximum?: (dataform.IIncrementalLoadMode|null);
4711
+
4712
+ /** LoadConfiguration unique */
4713
+ unique?: (dataform.IIncrementalLoadMode|null);
4714
+
4715
+ /** LoadConfiguration automatic */
4716
+ automatic?: (dataform.IIncrementalLoadMode|null);
4717
+ }
4718
+
4719
+ /** Represents a LoadConfiguration. */
4720
+ class LoadConfiguration implements ILoadConfiguration {
4721
+
4722
+ /**
4723
+ * Constructs a new LoadConfiguration.
4724
+ * @param [properties] Properties to set
4725
+ */
4726
+ constructor(properties?: dataform.ILoadConfiguration);
4727
+
4728
+ /** LoadConfiguration replace. */
4729
+ public replace?: (dataform.ISimpleLoadMode|null);
4730
+
4731
+ /** LoadConfiguration append. */
4732
+ public append?: (dataform.ISimpleLoadMode|null);
4733
+
4734
+ /** LoadConfiguration maximum. */
4735
+ public maximum?: (dataform.IIncrementalLoadMode|null);
4736
+
4737
+ /** LoadConfiguration unique. */
4738
+ public unique?: (dataform.IIncrementalLoadMode|null);
4739
+
4740
+ /** LoadConfiguration automatic. */
4741
+ public automatic?: (dataform.IIncrementalLoadMode|null);
4742
+
4743
+ /** LoadConfiguration mode. */
4744
+ public mode?: ("replace"|"append"|"maximum"|"unique"|"automatic");
4745
+
4746
+ /**
4747
+ * Creates a new LoadConfiguration instance using the specified properties.
4748
+ * @param [properties] Properties to set
4749
+ * @returns LoadConfiguration instance
4750
+ */
4751
+ public static create(properties?: dataform.ILoadConfiguration): dataform.LoadConfiguration;
4752
+
4753
+ /**
4754
+ * Encodes the specified LoadConfiguration message. Does not implicitly {@link dataform.LoadConfiguration.verify|verify} messages.
4755
+ * @param message LoadConfiguration message or plain object to encode
4756
+ * @param [writer] Writer to encode to
4757
+ * @returns Writer
4758
+ */
4759
+ public static encode(message: dataform.ILoadConfiguration, writer?: $protobuf.Writer): $protobuf.Writer;
4760
+
4761
+ /**
4762
+ * Encodes the specified LoadConfiguration message, length delimited. Does not implicitly {@link dataform.LoadConfiguration.verify|verify} messages.
4763
+ * @param message LoadConfiguration message or plain object to encode
4764
+ * @param [writer] Writer to encode to
4765
+ * @returns Writer
4766
+ */
4767
+ public static encodeDelimited(message: dataform.ILoadConfiguration, writer?: $protobuf.Writer): $protobuf.Writer;
4768
+
4769
+ /**
4770
+ * Decodes a LoadConfiguration message from the specified reader or buffer.
4771
+ * @param reader Reader or buffer to decode from
4772
+ * @param [length] Message length if known beforehand
4773
+ * @returns LoadConfiguration
4774
+ * @throws {Error} If the payload is not a reader or valid buffer
4775
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4776
+ */
4777
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): dataform.LoadConfiguration;
4778
+
4779
+ /**
4780
+ * Decodes a LoadConfiguration message from the specified reader or buffer, length delimited.
4781
+ * @param reader Reader or buffer to decode from
4782
+ * @returns LoadConfiguration
4783
+ * @throws {Error} If the payload is not a reader or valid buffer
4784
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4785
+ */
4786
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): dataform.LoadConfiguration;
4787
+
4788
+ /**
4789
+ * Verifies a LoadConfiguration message.
4790
+ * @param message Plain object to verify
4791
+ * @returns `null` if valid, otherwise the reason why it is not
4792
+ */
4793
+ public static verify(message: { [k: string]: any }): (string|null);
4794
+
4795
+ /**
4796
+ * Creates a LoadConfiguration message from a plain object. Also converts values to their respective internal types.
4797
+ * @param object Plain object
4798
+ * @returns LoadConfiguration
4799
+ */
4800
+ public static fromObject(object: { [k: string]: any }): dataform.LoadConfiguration;
4801
+
4802
+ /**
4803
+ * Creates a plain object from a LoadConfiguration message. Also converts values to other types if specified.
4804
+ * @param message LoadConfiguration
4805
+ * @param [options] Conversion options
4806
+ * @returns Plain object
4807
+ */
4808
+ public static toObject(message: dataform.LoadConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any };
4809
+
4810
+ /**
4811
+ * Converts this LoadConfiguration to JSON.
4812
+ * @returns JSON object
4813
+ */
4814
+ public toJSON(): { [k: string]: any };
4815
+
4816
+ /**
4817
+ * Gets the default type url for LoadConfiguration
4818
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
4819
+ * @returns The default type url
4820
+ */
4821
+ public static getTypeUrl(typeUrlPrefix?: string): string;
4822
+ }
4823
+
4824
+ /** Properties of a SimpleLoadMode. */
4825
+ interface ISimpleLoadMode {
4826
+ }
4827
+
4828
+ /** Represents a SimpleLoadMode. */
4829
+ class SimpleLoadMode implements ISimpleLoadMode {
4830
+
4831
+ /**
4832
+ * Constructs a new SimpleLoadMode.
4833
+ * @param [properties] Properties to set
4834
+ */
4835
+ constructor(properties?: dataform.ISimpleLoadMode);
4836
+
4837
+ /**
4838
+ * Creates a new SimpleLoadMode instance using the specified properties.
4839
+ * @param [properties] Properties to set
4840
+ * @returns SimpleLoadMode instance
4841
+ */
4842
+ public static create(properties?: dataform.ISimpleLoadMode): dataform.SimpleLoadMode;
4843
+
4844
+ /**
4845
+ * Encodes the specified SimpleLoadMode message. Does not implicitly {@link dataform.SimpleLoadMode.verify|verify} messages.
4846
+ * @param message SimpleLoadMode message or plain object to encode
4847
+ * @param [writer] Writer to encode to
4848
+ * @returns Writer
4849
+ */
4850
+ public static encode(message: dataform.ISimpleLoadMode, writer?: $protobuf.Writer): $protobuf.Writer;
4851
+
4852
+ /**
4853
+ * Encodes the specified SimpleLoadMode message, length delimited. Does not implicitly {@link dataform.SimpleLoadMode.verify|verify} messages.
4854
+ * @param message SimpleLoadMode message or plain object to encode
4855
+ * @param [writer] Writer to encode to
4856
+ * @returns Writer
4857
+ */
4858
+ public static encodeDelimited(message: dataform.ISimpleLoadMode, writer?: $protobuf.Writer): $protobuf.Writer;
4859
+
4860
+ /**
4861
+ * Decodes a SimpleLoadMode message from the specified reader or buffer.
4862
+ * @param reader Reader or buffer to decode from
4863
+ * @param [length] Message length if known beforehand
4864
+ * @returns SimpleLoadMode
4865
+ * @throws {Error} If the payload is not a reader or valid buffer
4866
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4867
+ */
4868
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): dataform.SimpleLoadMode;
4869
+
4870
+ /**
4871
+ * Decodes a SimpleLoadMode message from the specified reader or buffer, length delimited.
4872
+ * @param reader Reader or buffer to decode from
4873
+ * @returns SimpleLoadMode
4874
+ * @throws {Error} If the payload is not a reader or valid buffer
4875
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4876
+ */
4877
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): dataform.SimpleLoadMode;
4878
+
4879
+ /**
4880
+ * Verifies a SimpleLoadMode message.
4881
+ * @param message Plain object to verify
4882
+ * @returns `null` if valid, otherwise the reason why it is not
4883
+ */
4884
+ public static verify(message: { [k: string]: any }): (string|null);
4885
+
4886
+ /**
4887
+ * Creates a SimpleLoadMode message from a plain object. Also converts values to their respective internal types.
4888
+ * @param object Plain object
4889
+ * @returns SimpleLoadMode
4890
+ */
4891
+ public static fromObject(object: { [k: string]: any }): dataform.SimpleLoadMode;
4892
+
4893
+ /**
4894
+ * Creates a plain object from a SimpleLoadMode message. Also converts values to other types if specified.
4895
+ * @param message SimpleLoadMode
4896
+ * @param [options] Conversion options
4897
+ * @returns Plain object
4898
+ */
4899
+ public static toObject(message: dataform.SimpleLoadMode, options?: $protobuf.IConversionOptions): { [k: string]: any };
4900
+
4901
+ /**
4902
+ * Converts this SimpleLoadMode to JSON.
4903
+ * @returns JSON object
4904
+ */
4905
+ public toJSON(): { [k: string]: any };
4906
+
4907
+ /**
4908
+ * Gets the default type url for SimpleLoadMode
4909
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
4910
+ * @returns The default type url
4911
+ */
4912
+ public static getTypeUrl(typeUrlPrefix?: string): string;
4913
+ }
4914
+
4915
+ /** Properties of an IncrementalLoadMode. */
4916
+ interface IIncrementalLoadMode {
4917
+
4918
+ /** IncrementalLoadMode columnName */
4919
+ columnName?: (string|null);
4920
+ }
4921
+
4922
+ /** Represents an IncrementalLoadMode. */
4923
+ class IncrementalLoadMode implements IIncrementalLoadMode {
4924
+
4925
+ /**
4926
+ * Constructs a new IncrementalLoadMode.
4927
+ * @param [properties] Properties to set
4928
+ */
4929
+ constructor(properties?: dataform.IIncrementalLoadMode);
4930
+
4931
+ /** IncrementalLoadMode columnName. */
4932
+ public columnName: string;
4933
+
4934
+ /**
4935
+ * Creates a new IncrementalLoadMode instance using the specified properties.
4936
+ * @param [properties] Properties to set
4937
+ * @returns IncrementalLoadMode instance
4938
+ */
4939
+ public static create(properties?: dataform.IIncrementalLoadMode): dataform.IncrementalLoadMode;
4940
+
4941
+ /**
4942
+ * Encodes the specified IncrementalLoadMode message. Does not implicitly {@link dataform.IncrementalLoadMode.verify|verify} messages.
4943
+ * @param message IncrementalLoadMode message or plain object to encode
4944
+ * @param [writer] Writer to encode to
4945
+ * @returns Writer
4946
+ */
4947
+ public static encode(message: dataform.IIncrementalLoadMode, writer?: $protobuf.Writer): $protobuf.Writer;
4948
+
4949
+ /**
4950
+ * Encodes the specified IncrementalLoadMode message, length delimited. Does not implicitly {@link dataform.IncrementalLoadMode.verify|verify} messages.
4951
+ * @param message IncrementalLoadMode message or plain object to encode
4952
+ * @param [writer] Writer to encode to
4953
+ * @returns Writer
4954
+ */
4955
+ public static encodeDelimited(message: dataform.IIncrementalLoadMode, writer?: $protobuf.Writer): $protobuf.Writer;
4956
+
4957
+ /**
4958
+ * Decodes an IncrementalLoadMode message from the specified reader or buffer.
4959
+ * @param reader Reader or buffer to decode from
4960
+ * @param [length] Message length if known beforehand
4961
+ * @returns IncrementalLoadMode
4962
+ * @throws {Error} If the payload is not a reader or valid buffer
4963
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4964
+ */
4965
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): dataform.IncrementalLoadMode;
4966
+
4967
+ /**
4968
+ * Decodes an IncrementalLoadMode message from the specified reader or buffer, length delimited.
4969
+ * @param reader Reader or buffer to decode from
4970
+ * @returns IncrementalLoadMode
4971
+ * @throws {Error} If the payload is not a reader or valid buffer
4972
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4973
+ */
4974
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): dataform.IncrementalLoadMode;
4975
+
4976
+ /**
4977
+ * Verifies an IncrementalLoadMode message.
4978
+ * @param message Plain object to verify
4979
+ * @returns `null` if valid, otherwise the reason why it is not
4980
+ */
4981
+ public static verify(message: { [k: string]: any }): (string|null);
4982
+
4983
+ /**
4984
+ * Creates an IncrementalLoadMode message from a plain object. Also converts values to their respective internal types.
4985
+ * @param object Plain object
4986
+ * @returns IncrementalLoadMode
4987
+ */
4988
+ public static fromObject(object: { [k: string]: any }): dataform.IncrementalLoadMode;
4989
+
4990
+ /**
4991
+ * Creates a plain object from an IncrementalLoadMode message. Also converts values to other types if specified.
4992
+ * @param message IncrementalLoadMode
4993
+ * @param [options] Conversion options
4994
+ * @returns Plain object
4995
+ */
4996
+ public static toObject(message: dataform.IncrementalLoadMode, options?: $protobuf.IConversionOptions): { [k: string]: any };
4997
+
4998
+ /**
4999
+ * Converts this IncrementalLoadMode to JSON.
5000
+ * @returns JSON object
5001
+ */
5002
+ public toJSON(): { [k: string]: any };
5003
+
5004
+ /**
5005
+ * Gets the default type url for IncrementalLoadMode
5006
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
5007
+ * @returns The default type url
5008
+ */
5009
+ public static getTypeUrl(typeUrlPrefix?: string): string;
5010
+ }
5011
+
4453
5012
  /** Properties of a CompiledGraph. */
4454
5013
  interface ICompiledGraph {
4455
5014
 
@@ -7336,10 +7895,25 @@ namespace dataform {
7336
7895
  }
7337
7896
  }
7338
7897
 
7898
+ declare type Resolvable = string | dataform.ITarget;
7899
+ declare type Contextable<Context, T> = T | ((ctx: Context) => T);
7900
+ interface IActionContext {
7901
+ self: () => string;
7902
+ name: () => string;
7903
+ ref: (ref: Resolvable | string[], ...rest: string[]) => string;
7904
+ resolve: (ref: Resolvable | string[], ...rest: string[]) => string;
7905
+ schema: () => string;
7906
+ database: () => string;
7907
+ }
7908
+ interface ITableContext extends IActionContext {
7909
+ when: (cond: boolean, trueCase: string, falseCase?: string) => string;
7910
+ incremental: () => boolean;
7911
+ }
7912
+
7339
7913
  declare type AContextable<T> = T | ((ctx: AssertionContext) => T);
7340
7914
  declare class Assertion extends ActionBuilder<dataform.Assertion> {
7341
- proto: dataform.IAssertion;
7342
7915
  session: Session;
7916
+ private proto;
7343
7917
  private contextableQuery;
7344
7918
  constructor(session?: Session, unverifiedConfig?: any, configPath?: string);
7345
7919
  query(query: AContextable<string>): this;
@@ -7352,10 +7926,12 @@ declare class Assertion extends ActionBuilder<dataform.Assertion> {
7352
7926
  schema(schema: string): this;
7353
7927
  getFileName(): string;
7354
7928
  getTarget(): dataform.Target;
7929
+ getParentAction(): dataform.Target;
7930
+ setParentAction(target: dataform.Target): void;
7355
7931
  compile(): dataform.Assertion;
7356
7932
  private verifyConfig;
7357
7933
  }
7358
- declare class AssertionContext implements ICommonContext {
7934
+ declare class AssertionContext implements IActionContext {
7359
7935
  private assertion?;
7360
7936
  constructor(assertion: Assertion);
7361
7937
  self(): string;
@@ -7372,24 +7948,49 @@ declare class AssertionContext implements ICommonContext {
7372
7948
 
7373
7949
  declare class DataPreparation extends ActionBuilder<dataform.DataPreparation> {
7374
7950
  session: Session;
7375
- proto: dataform.IDataPreparation;
7951
+ contextableQuery: Contextable<ITableContext, string>;
7952
+ private proto;
7376
7953
  constructor(session?: Session, config?: dataform.ActionConfig.DataPreparationConfig, configPath?: string);
7377
7954
  config(config: any): this;
7955
+ query(query: Contextable<ITableContext, string>): this;
7378
7956
  dependencies(value: Resolvable | Resolvable[]): this;
7379
7957
  getFileName(): string;
7380
7958
  getTarget(): dataform.Target;
7381
7959
  compile(): dataform.DataPreparation;
7382
- private resolveEmpty;
7383
- private resolveTargets;
7960
+ database(database: string): this;
7961
+ schema(schema: string): this;
7962
+ private configureYamlWithoutTargets;
7963
+ private configureYamlWithTargets;
7384
7964
  private applySessionToDataPreparationContents;
7385
7965
  private applySessionToTableReference;
7386
7966
  private getTargets;
7967
+ private configureYaml;
7968
+ private configureSqlx;
7969
+ private mapLoadMode;
7970
+ private validateLoadModeColumnName;
7971
+ }
7972
+ declare class DataPreparationContext implements ITableContext {
7973
+ private dataPreparation;
7974
+ private isIncremental;
7975
+ EXPECT: string;
7976
+ constructor(dataPreparation: DataPreparation, isIncremental?: boolean);
7977
+ config(config: dataform.ActionConfig.DataPreparationConfig): string;
7978
+ self(): string;
7979
+ name(): string;
7980
+ ref(ref: Resolvable | string[], ...rest: string[]): string;
7981
+ resolve(ref: Resolvable | string[], ...rest: string[]): string;
7982
+ schema(): string;
7983
+ database(): string;
7984
+ when(cond: boolean, trueCase: string, falseCase?: string): string;
7985
+ incremental(): boolean;
7986
+ dependencies(res: Resolvable): string;
7987
+ apply<T>(value: Contextable<ITableContext, T>): T;
7387
7988
  }
7388
7989
 
7389
7990
  declare class Declaration extends ActionBuilder<dataform.Declaration> {
7390
- proto: dataform.IDeclaration;
7391
7991
  session: Session;
7392
- constructor(session?: Session, unverifiedConfig?: any);
7992
+ private proto;
7993
+ constructor(session?: Session, unverifiedConfig?: any, filename?: string);
7393
7994
  description(description: string): this;
7394
7995
  columns(columns: dataform.ActionConfig.ColumnDescriptor[]): this;
7395
7996
  getFileName(): string;
@@ -7398,26 +7999,20 @@ declare class Declaration extends ActionBuilder<dataform.Declaration> {
7398
7999
  private verifyConfig;
7399
8000
  }
7400
8001
 
7401
- interface ILegacyIncrementalTableConfig extends dataform.ActionConfig.IncrementalTableConfig {
7402
- dependencies: Resolvable[];
7403
- database: string;
7404
- schema: string;
7405
- fileName: string;
7406
- type: string;
7407
- bigquery?: ILegacyTableBigqueryConfig;
7408
- assertions: any;
7409
- }
7410
8002
  declare class IncrementalTable extends ActionBuilder<dataform.Table> {
7411
- proto: dataform.ITable;
7412
8003
  session: Session;
7413
8004
  dependOnDependencyAssertions: boolean;
7414
8005
  contextableQuery: Contextable<ITableContext, string>;
7415
8006
  private contextableWhere;
7416
8007
  private contextablePreOps;
7417
8008
  private contextablePostOps;
8009
+ private proto;
7418
8010
  private uniqueKeyAssertions;
7419
8011
  private rowConditionsAssertion;
8012
+ private unverifiedConfig;
8013
+ private configPath;
7420
8014
  constructor(session?: Session, unverifiedConfig?: any, configPath?: string);
8015
+ type(type: TableType): this;
7421
8016
  query(query: Contextable<ITableContext, string>): this;
7422
8017
  where(where: Contextable<ITableContext, string>): this;
7423
8018
  preOps(pres: Contextable<ITableContext, string | string[]>): this;
@@ -7433,7 +8028,7 @@ declare class IncrementalTable extends ActionBuilder<dataform.Table> {
7433
8028
  columns(columns: dataform.ActionConfig.ColumnDescriptor[]): this;
7434
8029
  database(database: string): this;
7435
8030
  schema(schema: string): this;
7436
- assertions(assertions: dataform.ActionConfig.TableAssertionsConfig): this;
8031
+ assertions(tableAssertionsConfig: dataform.ActionConfig.TableAssertionsConfig): IncrementalTable;
7437
8032
  setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
7438
8033
  getFileName(): string;
7439
8034
  getTarget(): dataform.Target;
@@ -7445,24 +8040,24 @@ declare class IncrementalTable extends ActionBuilder<dataform.Table> {
7445
8040
 
7446
8041
  declare class Notebook extends ActionBuilder<dataform.Notebook> {
7447
8042
  session: Session;
7448
- proto: dataform.INotebook;
7449
8043
  dependOnDependencyAssertions: boolean;
7450
- constructor(session?: Session, config?: dataform.ActionConfig.NotebookConfig, configPath?: string);
8044
+ private proto;
8045
+ constructor(session?: Session, unverifiedConfig?: any, configPath?: string);
7451
8046
  ipynb(contents: object): Notebook;
7452
- config(config: any): this;
7453
8047
  dependencies(value: Resolvable | Resolvable[]): this;
7454
8048
  getFileName(): string;
7455
8049
  getTarget(): dataform.Target;
7456
8050
  compile(): dataform.Notebook;
8051
+ private verifyConfig;
7457
8052
  }
7458
8053
 
7459
8054
  declare class Operation extends ActionBuilder<dataform.Operation> {
7460
- proto: dataform.IOperation;
7461
8055
  session: Session;
7462
8056
  dependOnDependencyAssertions: boolean;
8057
+ private proto;
7463
8058
  private contextableQueries;
7464
8059
  constructor(session?: Session, unverifiedConfig?: any, configPath?: string);
7465
- queries(queries: Contextable<ICommonContext, string | string[]>): this;
8060
+ queries(queries: Contextable<IActionContext, string | string[]>): this;
7466
8061
  dependencies(value: Resolvable | Resolvable[]): this;
7467
8062
  hermetic(hermetic: boolean): void;
7468
8063
  disabled(disabled?: boolean): this;
@@ -7475,10 +8070,11 @@ declare class Operation extends ActionBuilder<dataform.Operation> {
7475
8070
  setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
7476
8071
  getFileName(): string;
7477
8072
  getTarget(): dataform.Target;
8073
+ getHasOutput(): boolean;
7478
8074
  compile(): dataform.Operation;
7479
8075
  private verifyConfig;
7480
8076
  }
7481
- declare class OperationContext implements ICommonContext {
8077
+ declare class OperationContext implements IActionContext {
7482
8078
  private operation?;
7483
8079
  constructor(operation: Operation);
7484
8080
  self(): string;
@@ -7491,43 +8087,28 @@ declare class OperationContext implements ICommonContext {
7491
8087
  tags(name: string | string[]): string;
7492
8088
  hasOutput(hasOutput: boolean): string;
7493
8089
  when(cond: boolean, trueCase: string, falseCase?: string): string;
7494
- apply<T>(value: Contextable<ICommonContext, T>): T;
8090
+ apply<T>(value: Contextable<IActionContext, T>): T;
7495
8091
  }
7496
8092
 
7497
- interface ILegacyViewBigqueryConfig {
7498
- labels: {
7499
- [key: string]: string;
7500
- };
7501
- additionalOptions: {
7502
- [key: string]: string;
7503
- };
7504
- }
7505
- interface ILegacyViewConfig extends dataform.ActionConfig.ViewConfig {
7506
- dependencies: Resolvable[];
7507
- database: string;
7508
- schema: string;
7509
- fileName: string;
7510
- type: string;
7511
- bigquery: ILegacyViewBigqueryConfig;
7512
- assertions: any;
7513
- }
7514
- declare class View extends ActionBuilder<dataform.Table> {
7515
- proto: dataform.ITable;
8093
+ declare class Table extends ActionBuilder<dataform.Table> {
7516
8094
  session: Session;
7517
8095
  dependOnDependencyAssertions: boolean;
7518
8096
  contextableQuery: Contextable<ITableContext, string>;
7519
8097
  private contextableWhere;
7520
8098
  private contextablePreOps;
7521
8099
  private contextablePostOps;
8100
+ private proto;
7522
8101
  private uniqueKeyAssertions;
7523
8102
  private rowConditionsAssertion;
8103
+ private unverifiedConfig;
8104
+ private configPath;
7524
8105
  constructor(session?: Session, unverifiedConfig?: any, configPath?: string);
8106
+ type(type: TableType): this;
7525
8107
  query(query: Contextable<ITableContext, string>): this;
7526
8108
  where(where: Contextable<ITableContext, string>): this;
7527
8109
  preOps(pres: Contextable<ITableContext, string | string[]>): this;
7528
8110
  postOps(posts: Contextable<ITableContext, string | string[]>): this;
7529
8111
  disabled(disabled?: boolean): this;
7530
- materialized(materialized: boolean): void;
7531
8112
  bigquery(bigquery: dataform.IBigQueryOptions): this;
7532
8113
  dependencies(value: Resolvable | Resolvable[]): this;
7533
8114
  hermetic(hermetic: boolean): void;
@@ -7536,7 +8117,7 @@ declare class View extends ActionBuilder<dataform.Table> {
7536
8117
  columns(columns: dataform.ActionConfig.ColumnDescriptor[]): this;
7537
8118
  database(database: string): this;
7538
8119
  schema(schema: string): this;
7539
- assertions(assertions: dataform.ActionConfig.TableAssertionsConfig): this;
8120
+ assertions(tableAssertionsConfig: dataform.ActionConfig.TableAssertionsConfig): Table;
7540
8121
  setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
7541
8122
  getFileName(): string;
7542
8123
  getTarget(): dataform.Target;
@@ -7544,35 +8125,49 @@ declare class View extends ActionBuilder<dataform.Table> {
7544
8125
  private contextifyOps;
7545
8126
  private verifyConfig;
7546
8127
  }
7547
-
7548
- declare const TableType: readonly ["table", "view", "incremental"];
7549
- declare type TableType = typeof TableType[number];
7550
- interface ILegacyTableConfig extends dataform.ActionConfig.TableConfig {
7551
- dependencies: Resolvable[];
7552
- database: string;
7553
- schema: string;
7554
- fileName: string;
7555
- type: string;
7556
- bigquery?: ILegacyTableBigqueryConfig;
7557
- assertions: any;
8128
+ declare class TableContext implements ITableContext {
8129
+ private table;
8130
+ private isIncremental;
8131
+ constructor(table: Table, isIncremental?: boolean);
8132
+ self(): string;
8133
+ name(): string;
8134
+ ref(ref: Resolvable | string[], ...rest: string[]): string;
8135
+ resolve(ref: Resolvable | string[], ...rest: string[]): string;
8136
+ schema(): string;
8137
+ database(): string;
8138
+ type(type: TableType): string;
8139
+ where(where: Contextable<ITableContext, string>): string;
8140
+ when(cond: boolean, trueCase: string, falseCase?: string): string;
8141
+ incremental(): boolean;
8142
+ preOps(statement: Contextable<ITableContext, string | string[]>): string;
8143
+ postOps(statement: Contextable<ITableContext, string | string[]>): string;
8144
+ disabled(): string;
8145
+ bigquery(bigquery: dataform.IBigQueryOptions): string;
8146
+ dependencies(res: Resolvable): string;
8147
+ apply<T>(value: Contextable<ITableContext, T>): T;
8148
+ tags(tags: string[]): string;
7558
8149
  }
7559
- declare class Table extends ActionBuilder<dataform.Table> {
7560
- proto: dataform.ITable;
8150
+
8151
+ declare class View extends ActionBuilder<dataform.Table> {
7561
8152
  session: Session;
7562
8153
  dependOnDependencyAssertions: boolean;
7563
8154
  contextableQuery: Contextable<ITableContext, string>;
7564
8155
  private contextableWhere;
7565
8156
  private contextablePreOps;
7566
8157
  private contextablePostOps;
8158
+ private proto;
7567
8159
  private uniqueKeyAssertions;
7568
8160
  private rowConditionsAssertion;
8161
+ private unverifiedConfig;
8162
+ private configPath;
7569
8163
  constructor(session?: Session, unverifiedConfig?: any, configPath?: string);
7570
- type(type: TableType): this | View | IncrementalTable;
8164
+ type(type: TableType): this;
7571
8165
  query(query: Contextable<ITableContext, string>): this;
7572
8166
  where(where: Contextable<ITableContext, string>): this;
7573
8167
  preOps(pres: Contextable<ITableContext, string | string[]>): this;
7574
8168
  postOps(posts: Contextable<ITableContext, string | string[]>): this;
7575
8169
  disabled(disabled?: boolean): this;
8170
+ materialized(materialized: boolean): void;
7576
8171
  bigquery(bigquery: dataform.IBigQueryOptions): this;
7577
8172
  dependencies(value: Resolvable | Resolvable[]): this;
7578
8173
  hermetic(hermetic: boolean): void;
@@ -7581,7 +8176,7 @@ declare class Table extends ActionBuilder<dataform.Table> {
7581
8176
  columns(columns: dataform.ActionConfig.ColumnDescriptor[]): this;
7582
8177
  database(database: string): this;
7583
8178
  schema(schema: string): this;
7584
- assertions(assertions: dataform.ActionConfig.TableAssertionsConfig): this;
8179
+ assertions(tableAssertionsConfig: dataform.ActionConfig.TableAssertionsConfig): View;
7585
8180
  setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
7586
8181
  getFileName(): string;
7587
8182
  getTarget(): dataform.Target;
@@ -7589,27 +8184,16 @@ declare class Table extends ActionBuilder<dataform.Table> {
7589
8184
  private contextifyOps;
7590
8185
  private verifyConfig;
7591
8186
  }
7592
- declare class TableContext implements ITableContext {
7593
- private table;
7594
- private isIncremental;
7595
- constructor(table: Table, isIncremental?: boolean);
7596
- self(): string;
7597
- name(): string;
7598
- ref(ref: Resolvable | string[], ...rest: string[]): string;
7599
- resolve(ref: Resolvable | string[], ...rest: string[]): string;
7600
- schema(): string;
7601
- database(): string;
7602
- type(type: TableType): string;
7603
- where(where: Contextable<ITableContext, string>): string;
7604
- when(cond: boolean, trueCase: string, falseCase?: string): string;
7605
- incremental(): boolean;
7606
- preOps(statement: Contextable<ITableContext, string | string[]>): string;
7607
- postOps(statement: Contextable<ITableContext, string | string[]>): string;
7608
- disabled(): string;
7609
- bigquery(bigquery: dataform.IBigQueryOptions): string;
7610
- dependencies(res: Resolvable): string;
7611
- apply<T>(value: Contextable<ITableContext, T>): T;
7612
- tags(tags: string[]): string;
8187
+
8188
+ interface IColumnsDescriptor {
8189
+ [name: string]: string | IRecordDescriptor;
8190
+ }
8191
+ interface IRecordDescriptor {
8192
+ description?: string;
8193
+ columns?: IColumnsDescriptor;
8194
+ displayName?: string;
8195
+ tags?: string | string[];
8196
+ bigqueryPolicyTags?: string | string[];
7613
8197
  }
7614
8198
 
7615
8199
  declare type Action = Table | View | IncrementalTable | Operation | Assertion | Declaration | Notebook | DataPreparation;
@@ -7617,69 +8201,90 @@ declare abstract class ActionBuilder<T> {
7617
8201
  session: Session;
7618
8202
  includeAssertionsForDependency: Map<string, boolean>;
7619
8203
  constructor(session?: Session);
7620
- applySessionToTarget(targetFromConfig: dataform.Target, projectConfig: dataform.ProjectConfig, fileName?: string, validateTarget?: boolean, useDefaultAssertionDataset?: boolean): dataform.Target;
8204
+ applySessionToTarget(targetFromConfig: dataform.Target, projectConfig: dataform.ProjectConfig, fileName?: string, options?: {
8205
+ validateTarget?: boolean;
8206
+ useDefaultAssertionDataset?: boolean;
8207
+ }): dataform.Target;
7621
8208
  finalizeTarget(targetFromConfig: dataform.Target): dataform.Target;
7622
8209
  abstract getFileName(): string;
7623
8210
  abstract getTarget(): dataform.Target;
7624
8211
  abstract compile(): T;
8212
+ protected generateInlineAssertions(tableAssertionsConfig: dataform.ActionConfig.TableAssertionsConfig, proto: dataform.Table): {
8213
+ uniqueKeyAssertions: Assertion[];
8214
+ rowConditionsAssertion?: Assertion;
8215
+ };
7625
8216
  private validateTarget;
7626
8217
  }
7627
- interface ITableContext extends ICommonContext {
7628
- when: (cond: boolean, trueCase: string, falseCase?: string) => string;
7629
- incremental: () => boolean;
8218
+ interface INamedConfig {
8219
+ type?: string;
8220
+ name?: string;
8221
+ }
8222
+ interface IActionConfig {
8223
+ tags?: string[];
8224
+ dependencies?: Resolvable | Resolvable[];
8225
+ disabled?: boolean;
7630
8226
  }
7631
- interface ILegacyTableBigqueryConfig {
8227
+ interface ITargetableConfig {
8228
+ database?: string;
8229
+ schema?: string;
8230
+ }
8231
+ interface IDependenciesConfig {
8232
+ dependencies?: Resolvable | Resolvable[];
8233
+ hermetic?: boolean;
8234
+ dependOnDependencyAssertions?: boolean;
8235
+ }
8236
+ interface IDocumentableConfig {
8237
+ columns?: IColumnsDescriptor;
8238
+ description?: string;
8239
+ }
8240
+ declare type TableType = typeof TableType[number];
8241
+ declare const TableType: readonly ["table", "view", "incremental"];
8242
+ interface ILegacyTableConfig extends IActionConfig, IDependenciesConfig, IDocumentableConfig, INamedConfig, ITargetableConfig {
8243
+ type?: TableType;
8244
+ protected?: boolean;
8245
+ bigquery?: ILegacyBigQueryOptions;
8246
+ assertions?: ILegacyTableAssertions;
8247
+ uniqueKey?: string[];
8248
+ materialized?: boolean;
8249
+ }
8250
+ interface ILegacyBigQueryOptions {
7632
8251
  partitionBy?: string;
7633
8252
  clusterBy?: string[];
7634
8253
  updatePartitionFilter?: string;
7635
8254
  labels?: {
7636
- [key: string]: string;
8255
+ [name: string]: string;
7637
8256
  };
7638
8257
  partitionExpirationDays?: number;
7639
8258
  requirePartitionFilter?: boolean;
7640
8259
  additionalOptions?: {
7641
- [key: string]: string;
8260
+ [name: string]: string;
7642
8261
  };
7643
8262
  }
7644
-
7645
- interface IStringifier<T> {
7646
- stringify: (value: T) => string;
7647
- parse: (value: string) => T;
7648
- }
7649
- declare class StringifiedMap<K, V> implements Map<K, V> {
7650
- private readonly stringifier;
7651
- get [Symbol.toStringTag](): string;
7652
- get size(): number;
7653
- private map;
7654
- constructor(stringifier: IStringifier<K>, entries?: readonly (readonly [K, V])[] | null);
7655
- clear(): void;
7656
- delete(key: K): boolean;
7657
- forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
7658
- get(key: K): V;
7659
- has(key: K): boolean;
7660
- set(key: K, value: V): this;
7661
- [Symbol.iterator](): IterableIterator<[K, V]>;
7662
- entries(): IterableIterator<[K, V]>;
7663
- keys(): IterableIterator<K>;
7664
- values(): IterableIterator<V>;
8263
+ interface ILegacyTableAssertions {
8264
+ uniqueKey?: string | string[];
8265
+ uniqueKeys?: string[][];
8266
+ nonNull?: string | string[];
8267
+ rowConditions?: string[];
7665
8268
  }
7666
8269
 
7667
8270
  interface ITestConfig extends INamedConfig {
7668
8271
  dataset?: Resolvable;
8272
+ name?: string;
7669
8273
  }
7670
8274
  declare class Test extends ActionBuilder<dataform.Test> {
7671
- proto: dataform.ITest;
7672
8275
  session: Session;
7673
- contextableInputs: StringifiedMap<dataform.ITarget, Contextable<ICommonContext, string>>;
7674
- private datasetToTest;
8276
+ contextableInputs: Map<string, Contextable<IActionContext, string>>;
7675
8277
  private contextableQuery;
7676
- constructor(session?: Session);
8278
+ private datasetToTest;
8279
+ private proto;
8280
+ constructor(session?: Session, config?: ITestConfig);
7677
8281
  config(config: ITestConfig): this;
7678
8282
  dataset(ref: Resolvable): this;
7679
- input(refName: string | string[], contextableQuery: Contextable<ICommonContext, string>): this;
7680
- expect(contextableQuery: Contextable<ICommonContext, string>): this;
8283
+ input(refName: string | string[], contextableQuery: Contextable<IActionContext, string>): this;
8284
+ expect(contextableQuery: Contextable<IActionContext, string>): this;
7681
8285
  getFileName(): string;
7682
8286
  getTarget(): undefined;
8287
+ setFilename(filename: string): void;
7683
8288
  compile(): dataform.Test;
7684
8289
  }
7685
8290
 
@@ -7710,22 +8315,22 @@ declare class Session {
7710
8315
  sqlxAction(actionOptions: {
7711
8316
  sqlxConfig: any;
7712
8317
  sqlStatementCount: number;
7713
- sqlContextable: (ctx: TableContext | AssertionContext | OperationContext | ICommonContext) => string[];
8318
+ sqlContextable: (ctx: TableContext | AssertionContext | OperationContext | DataPreparationContext | IActionContext) => string[];
7714
8319
  incrementalWhereContextable: (ctx: ITableContext) => string;
7715
8320
  preOperationsContextable: (ctx: ITableContext) => string[];
7716
8321
  postOperationsContextable: (ctx: ITableContext) => string[];
7717
8322
  inputContextables: [{
7718
8323
  refName: string[];
7719
- contextable: (ctx: ICommonContext) => string;
8324
+ contextable: (ctx: IActionContext) => string;
7720
8325
  }];
7721
8326
  }): void;
7722
8327
  resolve(ref: Resolvable | string[], ...rest: string[]): string;
7723
- operate(name: string, queries?: Contextable<ICommonContext, string | string[]>): Operation;
7724
- publish(name: string, queryOrConfig?: Contextable<ITableContext, string> | ILegacyTableConfig | ILegacyViewConfig | ILegacyIncrementalTableConfig): Table | IncrementalTable | View;
7725
- assert(name: string, query?: AContextable<string>): Assertion;
7726
- declare(dataset: dataform.ITarget): Declaration;
8328
+ operate(name: string, queryOrConfig?: Contextable<IActionContext, string | string[]> | dataform.ActionConfig.OperationConfig): Operation;
8329
+ publish(name: string, queryOrConfig?: Contextable<ITableContext, string> | dataform.ActionConfig.TableConfig | dataform.ActionConfig.ViewConfig | dataform.ActionConfig.IncrementalTableConfig | ILegacyTableConfig | any): Table | IncrementalTable | View;
8330
+ assert(name: string, queryOrConfig?: AContextable<string> | dataform.ActionConfig.AssertionConfig): Assertion;
8331
+ declare(config: dataform.ActionConfig.DeclarationConfig | any): Declaration;
7727
8332
  test(name: string): Test;
7728
- notebook(name: string): Notebook;
8333
+ notebook(config: dataform.ActionConfig.NotebookConfig): Notebook;
7729
8334
  compileError(err: Error | string, path?: string, actionTarget?: dataform.ITarget): void;
7730
8335
  compile(): dataform.CompiledGraph;
7731
8336
  compileToBase64(): string;
@@ -7738,7 +8343,6 @@ declare class Session {
7738
8343
  private compileGraphChunk;
7739
8344
  private fullyQualifyDependencies;
7740
8345
  private alterActionName;
7741
- private checkTableConfigValidity;
7742
8346
  private checkTestNameUniqueness;
7743
8347
  private checkCircularity;
7744
8348
  private removeNonUniqueActionsFromCompiledGraph;
@@ -7749,13 +8353,13 @@ declare class ActionMap {
7749
8353
  private byDatabaseAndName;
7750
8354
  private byDatabaseSchemaAndName;
7751
8355
  constructor(actions: Action[]);
7752
- set(actionTarget: ITarget, assertionTarget: Action): void;
8356
+ set(actionTarget: dataform.ITarget, assertionTarget: Action): void;
7753
8357
  find(target: dataform.ITarget): Action[];
7754
8358
  private setByNameLevel;
7755
8359
  private setBySchemaLevel;
7756
8360
  }
7757
8361
 
7758
- declare const version = "3.0.12";
8362
+ declare const version = "3.0.14";
7759
8363
 
7760
8364
  declare const session: Session;
7761
8365
  declare const supportedFeatures: dataform.SupportedFeatures[];