@dataform/core 3.0.13 → 3.0.15

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,55 +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 IActionConfig {
20
- tags?: string[];
21
- dependencies?: Resolvable | Resolvable[];
22
- disabled?: boolean;
23
- }
24
- interface ITargetableConfig {
25
- database?: string;
26
- schema?: string;
27
- }
28
- interface IDependenciesConfig {
29
- dependencies?: Resolvable | Resolvable[];
30
- hermetic?: boolean;
31
- dependOnDependencyAssertions?: boolean;
32
- }
33
- interface IDocumentableConfig {
34
- columns?: IColumnsDescriptor;
35
- description?: string;
36
- }
37
- interface IColumnsDescriptor {
38
- [name: string]: string | IRecordDescriptor;
39
- }
40
- interface IRecordDescriptor {
41
- description?: string;
42
- columns?: IColumnsDescriptor;
43
- displayName?: string;
44
- tags?: string | string[];
45
- bigqueryPolicyTags?: string | string[];
46
- }
47
- interface ITarget {
48
- database?: string;
49
- schema?: string;
50
- name?: string;
51
- includeDependentAssertions?: boolean;
52
- }
53
- declare type Resolvable = string | ITarget;
54
- declare type Contextable<Context, T> = T | ((ctx: Context) => T);
55
-
56
7
  /** Namespace dataform. */
57
8
  namespace dataform {
58
9
 
@@ -2143,6 +2094,9 @@ namespace dataform {
2143
2094
 
2144
2095
  /** DataPreparationConfig errorTable */
2145
2096
  errorTable?: (dataform.ActionConfig.DataPreparationConfig.IErrorTableConfig|null);
2097
+
2098
+ /** DataPreparationConfig loadMode */
2099
+ loadMode?: (dataform.ActionConfig.ILoadModeConfig|null);
2146
2100
  }
2147
2101
 
2148
2102
  /** Represents a DataPreparationConfig. */
@@ -2175,6 +2129,9 @@ namespace dataform {
2175
2129
  /** DataPreparationConfig errorTable. */
2176
2130
  public errorTable?: (dataform.ActionConfig.DataPreparationConfig.IErrorTableConfig|null);
2177
2131
 
2132
+ /** DataPreparationConfig loadMode. */
2133
+ public loadMode?: (dataform.ActionConfig.ILoadModeConfig|null);
2134
+
2178
2135
  /**
2179
2136
  * Creates a new DataPreparationConfig instance using the specified properties.
2180
2137
  * @param [properties] Properties to set
@@ -2370,6 +2327,117 @@ namespace dataform {
2370
2327
  public static getTypeUrl(typeUrlPrefix?: string): string;
2371
2328
  }
2372
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
+ }
2373
2441
  }
2374
2442
 
2375
2443
  /** Properties of a NotebookRuntimeOptionsConfig. */
@@ -4495,6 +4563,9 @@ namespace dataform {
4495
4563
 
4496
4564
  /** DataPreparation errorTableRetentionDays */
4497
4565
  errorTableRetentionDays?: (number|null);
4566
+
4567
+ /** DataPreparation load */
4568
+ load?: (dataform.ILoadConfiguration|null);
4498
4569
  }
4499
4570
 
4500
4571
  /** Represents a DataPreparation. */
@@ -4542,6 +4613,9 @@ namespace dataform {
4542
4613
  /** DataPreparation errorTableRetentionDays. */
4543
4614
  public errorTableRetentionDays: number;
4544
4615
 
4616
+ /** DataPreparation load. */
4617
+ public load?: (dataform.ILoadConfiguration|null);
4618
+
4545
4619
  /** DataPreparation definition. */
4546
4620
  public definition?: ("dataPreparationYaml"|"query");
4547
4621
 
@@ -4623,6 +4697,318 @@ namespace dataform {
4623
4697
  public static getTypeUrl(typeUrlPrefix?: string): string;
4624
4698
  }
4625
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
+
4626
5012
  /** Properties of a CompiledGraph. */
4627
5013
  interface ICompiledGraph {
4628
5014
 
@@ -7509,10 +7895,25 @@ namespace dataform {
7509
7895
  }
7510
7896
  }
7511
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
+
7512
7913
  declare type AContextable<T> = T | ((ctx: AssertionContext) => T);
7513
7914
  declare class Assertion extends ActionBuilder<dataform.Assertion> {
7514
- proto: dataform.IAssertion;
7515
7915
  session: Session;
7916
+ private proto;
7516
7917
  private contextableQuery;
7517
7918
  constructor(session?: Session, unverifiedConfig?: any, configPath?: string);
7518
7919
  query(query: AContextable<string>): this;
@@ -7525,10 +7926,12 @@ declare class Assertion extends ActionBuilder<dataform.Assertion> {
7525
7926
  schema(schema: string): this;
7526
7927
  getFileName(): string;
7527
7928
  getTarget(): dataform.Target;
7929
+ getParentAction(): dataform.Target;
7930
+ setParentAction(target: dataform.Target): void;
7528
7931
  compile(): dataform.Assertion;
7529
7932
  private verifyConfig;
7530
7933
  }
7531
- declare class AssertionContext implements ICommonContext {
7934
+ declare class AssertionContext implements IActionContext {
7532
7935
  private assertion?;
7533
7936
  constructor(assertion: Assertion);
7534
7937
  self(): string;
@@ -7545,11 +7948,11 @@ declare class AssertionContext implements ICommonContext {
7545
7948
 
7546
7949
  declare class DataPreparation extends ActionBuilder<dataform.DataPreparation> {
7547
7950
  session: Session;
7548
- contextableQuery: Contextable<IDataPreparationContext, string>;
7549
- proto: dataform.IDataPreparation;
7951
+ contextableQuery: Contextable<ITableContext, string>;
7952
+ private proto;
7550
7953
  constructor(session?: Session, config?: dataform.ActionConfig.DataPreparationConfig, configPath?: string);
7551
7954
  config(config: any): this;
7552
- query(query: Contextable<IDataPreparationContext, string>): this;
7955
+ query(query: Contextable<ITableContext, string>): this;
7553
7956
  dependencies(value: Resolvable | Resolvable[]): this;
7554
7957
  getFileName(): string;
7555
7958
  getTarget(): dataform.Target;
@@ -7563,15 +7966,15 @@ declare class DataPreparation extends ActionBuilder<dataform.DataPreparation> {
7563
7966
  private getTargets;
7564
7967
  private configureYaml;
7565
7968
  private configureSqlx;
7969
+ private mapLoadMode;
7970
+ private validateLoadModeColumnName;
7566
7971
  }
7567
- interface IDataPreparationContext extends ITableContext {
7568
- validate: (exp: string) => string;
7569
- }
7570
- declare class DataPreparationContext implements IDataPreparationContext {
7972
+ declare class DataPreparationContext implements ITableContext {
7571
7973
  private dataPreparation;
7572
7974
  private isIncremental;
7975
+ EXPECT: string;
7573
7976
  constructor(dataPreparation: DataPreparation, isIncremental?: boolean);
7574
- config(config: dataform.ActionConfig.DataPreparationConfig.ErrorTableConfig): string;
7977
+ config(config: dataform.ActionConfig.DataPreparationConfig): string;
7575
7978
  self(): string;
7576
7979
  name(): string;
7577
7980
  ref(ref: Resolvable | string[], ...rest: string[]): string;
@@ -7581,14 +7984,13 @@ declare class DataPreparationContext implements IDataPreparationContext {
7581
7984
  when(cond: boolean, trueCase: string, falseCase?: string): string;
7582
7985
  incremental(): boolean;
7583
7986
  dependencies(res: Resolvable): string;
7584
- validate(exp: string): string;
7585
- apply<T>(value: Contextable<IDataPreparationContext, T>): T;
7987
+ apply<T>(value: Contextable<ITableContext, T>): T;
7586
7988
  }
7587
7989
 
7588
7990
  declare class Declaration extends ActionBuilder<dataform.Declaration> {
7589
- proto: dataform.IDeclaration;
7590
7991
  session: Session;
7591
- constructor(session?: Session, unverifiedConfig?: any);
7992
+ private proto;
7993
+ constructor(session?: Session, unverifiedConfig?: any, filename?: string);
7592
7994
  description(description: string): this;
7593
7995
  columns(columns: dataform.ActionConfig.ColumnDescriptor[]): this;
7594
7996
  getFileName(): string;
@@ -7598,13 +8000,13 @@ declare class Declaration extends ActionBuilder<dataform.Declaration> {
7598
8000
  }
7599
8001
 
7600
8002
  declare class IncrementalTable extends ActionBuilder<dataform.Table> {
7601
- proto: dataform.ITable;
7602
8003
  session: Session;
7603
8004
  dependOnDependencyAssertions: boolean;
7604
8005
  contextableQuery: Contextable<ITableContext, string>;
7605
8006
  private contextableWhere;
7606
8007
  private contextablePreOps;
7607
8008
  private contextablePostOps;
8009
+ private proto;
7608
8010
  private uniqueKeyAssertions;
7609
8011
  private rowConditionsAssertion;
7610
8012
  private unverifiedConfig;
@@ -7626,7 +8028,7 @@ declare class IncrementalTable extends ActionBuilder<dataform.Table> {
7626
8028
  columns(columns: dataform.ActionConfig.ColumnDescriptor[]): this;
7627
8029
  database(database: string): this;
7628
8030
  schema(schema: string): this;
7629
- assertions(assertions: dataform.ActionConfig.TableAssertionsConfig): this;
8031
+ assertions(tableAssertionsConfig: dataform.ActionConfig.TableAssertionsConfig): IncrementalTable;
7630
8032
  setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
7631
8033
  getFileName(): string;
7632
8034
  getTarget(): dataform.Target;
@@ -7638,24 +8040,24 @@ declare class IncrementalTable extends ActionBuilder<dataform.Table> {
7638
8040
 
7639
8041
  declare class Notebook extends ActionBuilder<dataform.Notebook> {
7640
8042
  session: Session;
7641
- proto: dataform.INotebook;
7642
8043
  dependOnDependencyAssertions: boolean;
7643
- constructor(session?: Session, config?: dataform.ActionConfig.NotebookConfig, configPath?: string);
8044
+ private proto;
8045
+ constructor(session?: Session, unverifiedConfig?: any, configPath?: string);
7644
8046
  ipynb(contents: object): Notebook;
7645
- config(config: any): this;
7646
8047
  dependencies(value: Resolvable | Resolvable[]): this;
7647
8048
  getFileName(): string;
7648
8049
  getTarget(): dataform.Target;
7649
8050
  compile(): dataform.Notebook;
8051
+ private verifyConfig;
7650
8052
  }
7651
8053
 
7652
8054
  declare class Operation extends ActionBuilder<dataform.Operation> {
7653
- proto: dataform.IOperation;
7654
8055
  session: Session;
7655
8056
  dependOnDependencyAssertions: boolean;
8057
+ private proto;
7656
8058
  private contextableQueries;
7657
8059
  constructor(session?: Session, unverifiedConfig?: any, configPath?: string);
7658
- queries(queries: Contextable<ICommonContext, string | string[]>): this;
8060
+ queries(queries: Contextable<IActionContext, string | string[]>): this;
7659
8061
  dependencies(value: Resolvable | Resolvable[]): this;
7660
8062
  hermetic(hermetic: boolean): void;
7661
8063
  disabled(disabled?: boolean): this;
@@ -7668,10 +8070,11 @@ declare class Operation extends ActionBuilder<dataform.Operation> {
7668
8070
  setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
7669
8071
  getFileName(): string;
7670
8072
  getTarget(): dataform.Target;
8073
+ getHasOutput(): boolean;
7671
8074
  compile(): dataform.Operation;
7672
8075
  private verifyConfig;
7673
8076
  }
7674
- declare class OperationContext implements ICommonContext {
8077
+ declare class OperationContext implements IActionContext {
7675
8078
  private operation?;
7676
8079
  constructor(operation: Operation);
7677
8080
  self(): string;
@@ -7684,17 +8087,17 @@ declare class OperationContext implements ICommonContext {
7684
8087
  tags(name: string | string[]): string;
7685
8088
  hasOutput(hasOutput: boolean): string;
7686
8089
  when(cond: boolean, trueCase: string, falseCase?: string): string;
7687
- apply<T>(value: Contextable<ICommonContext, T>): T;
8090
+ apply<T>(value: Contextable<IActionContext, T>): T;
7688
8091
  }
7689
8092
 
7690
8093
  declare class Table extends ActionBuilder<dataform.Table> {
7691
- proto: dataform.ITable;
7692
8094
  session: Session;
7693
8095
  dependOnDependencyAssertions: boolean;
7694
8096
  contextableQuery: Contextable<ITableContext, string>;
7695
8097
  private contextableWhere;
7696
8098
  private contextablePreOps;
7697
8099
  private contextablePostOps;
8100
+ private proto;
7698
8101
  private uniqueKeyAssertions;
7699
8102
  private rowConditionsAssertion;
7700
8103
  private unverifiedConfig;
@@ -7714,7 +8117,7 @@ declare class Table extends ActionBuilder<dataform.Table> {
7714
8117
  columns(columns: dataform.ActionConfig.ColumnDescriptor[]): this;
7715
8118
  database(database: string): this;
7716
8119
  schema(schema: string): this;
7717
- assertions(assertions: dataform.ActionConfig.TableAssertionsConfig): this;
8120
+ assertions(tableAssertionsConfig: dataform.ActionConfig.TableAssertionsConfig): Table;
7718
8121
  setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
7719
8122
  getFileName(): string;
7720
8123
  getTarget(): dataform.Target;
@@ -7746,13 +8149,13 @@ declare class TableContext implements ITableContext {
7746
8149
  }
7747
8150
 
7748
8151
  declare class View extends ActionBuilder<dataform.Table> {
7749
- proto: dataform.ITable;
7750
8152
  session: Session;
7751
8153
  dependOnDependencyAssertions: boolean;
7752
8154
  contextableQuery: Contextable<ITableContext, string>;
7753
8155
  private contextableWhere;
7754
8156
  private contextablePreOps;
7755
8157
  private contextablePostOps;
8158
+ private proto;
7756
8159
  private uniqueKeyAssertions;
7757
8160
  private rowConditionsAssertion;
7758
8161
  private unverifiedConfig;
@@ -7773,7 +8176,7 @@ declare class View extends ActionBuilder<dataform.Table> {
7773
8176
  columns(columns: dataform.ActionConfig.ColumnDescriptor[]): this;
7774
8177
  database(database: string): this;
7775
8178
  schema(schema: string): this;
7776
- assertions(assertions: dataform.ActionConfig.TableAssertionsConfig): this;
8179
+ assertions(tableAssertionsConfig: dataform.ActionConfig.TableAssertionsConfig): View;
7777
8180
  setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
7778
8181
  getFileName(): string;
7779
8182
  getTarget(): dataform.Target;
@@ -7782,21 +8185,57 @@ declare class View extends ActionBuilder<dataform.Table> {
7782
8185
  private verifyConfig;
7783
8186
  }
7784
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[];
8197
+ }
8198
+
7785
8199
  declare type Action = Table | View | IncrementalTable | Operation | Assertion | Declaration | Notebook | DataPreparation;
7786
8200
  declare abstract class ActionBuilder<T> {
7787
8201
  session: Session;
7788
8202
  includeAssertionsForDependency: Map<string, boolean>;
7789
8203
  constructor(session?: Session);
7790
- 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;
7791
8208
  finalizeTarget(targetFromConfig: dataform.Target): dataform.Target;
7792
8209
  abstract getFileName(): string;
7793
8210
  abstract getTarget(): dataform.Target;
7794
8211
  abstract compile(): T;
8212
+ protected generateInlineAssertions(tableAssertionsConfig: dataform.ActionConfig.TableAssertionsConfig, proto: dataform.Table): {
8213
+ uniqueKeyAssertions: Assertion[];
8214
+ rowConditionsAssertion?: Assertion;
8215
+ };
7795
8216
  private validateTarget;
7796
8217
  }
7797
- interface ITableContext extends ICommonContext {
7798
- when: (cond: boolean, trueCase: string, falseCase?: string) => string;
7799
- 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;
8226
+ }
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;
7800
8239
  }
7801
8240
  declare type TableType = typeof TableType[number];
7802
8241
  declare const TableType: readonly ["table", "view", "incremental"];
@@ -7828,44 +8267,24 @@ interface ILegacyTableAssertions {
7828
8267
  rowConditions?: string[];
7829
8268
  }
7830
8269
 
7831
- interface IStringifier<T> {
7832
- stringify: (value: T) => string;
7833
- parse: (value: string) => T;
7834
- }
7835
- declare class StringifiedMap<K, V> implements Map<K, V> {
7836
- private readonly stringifier;
7837
- get [Symbol.toStringTag](): string;
7838
- get size(): number;
7839
- private map;
7840
- constructor(stringifier: IStringifier<K>, entries?: readonly (readonly [K, V])[] | null);
7841
- clear(): void;
7842
- delete(key: K): boolean;
7843
- forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
7844
- get(key: K): V;
7845
- has(key: K): boolean;
7846
- set(key: K, value: V): this;
7847
- [Symbol.iterator](): IterableIterator<[K, V]>;
7848
- entries(): IterableIterator<[K, V]>;
7849
- keys(): IterableIterator<K>;
7850
- values(): IterableIterator<V>;
7851
- }
7852
-
7853
8270
  interface ITestConfig extends INamedConfig {
7854
8271
  dataset?: Resolvable;
8272
+ name?: string;
7855
8273
  }
7856
8274
  declare class Test extends ActionBuilder<dataform.Test> {
7857
- proto: dataform.ITest;
7858
8275
  session: Session;
7859
- contextableInputs: StringifiedMap<dataform.ITarget, Contextable<ICommonContext, string>>;
7860
- private datasetToTest;
8276
+ contextableInputs: Map<string, Contextable<IActionContext, string>>;
7861
8277
  private contextableQuery;
7862
- constructor(session?: Session);
8278
+ private datasetToTest;
8279
+ private proto;
8280
+ constructor(session?: Session, config?: ITestConfig);
7863
8281
  config(config: ITestConfig): this;
7864
8282
  dataset(ref: Resolvable): this;
7865
- input(refName: string | string[], contextableQuery: Contextable<ICommonContext, string>): this;
7866
- expect(contextableQuery: Contextable<ICommonContext, string>): this;
8283
+ input(refName: string | string[], contextableQuery: Contextable<IActionContext, string>): this;
8284
+ expect(contextableQuery: Contextable<IActionContext, string>): this;
7867
8285
  getFileName(): string;
7868
8286
  getTarget(): undefined;
8287
+ setFilename(filename: string): void;
7869
8288
  compile(): dataform.Test;
7870
8289
  }
7871
8290
 
@@ -7896,22 +8315,22 @@ declare class Session {
7896
8315
  sqlxAction(actionOptions: {
7897
8316
  sqlxConfig: any;
7898
8317
  sqlStatementCount: number;
7899
- sqlContextable: (ctx: TableContext | AssertionContext | OperationContext | DataPreparationContext | IDataPreparationContext | ICommonContext) => string[];
8318
+ sqlContextable: (ctx: TableContext | AssertionContext | OperationContext | DataPreparationContext | IActionContext) => string[];
7900
8319
  incrementalWhereContextable: (ctx: ITableContext) => string;
7901
8320
  preOperationsContextable: (ctx: ITableContext) => string[];
7902
8321
  postOperationsContextable: (ctx: ITableContext) => string[];
7903
8322
  inputContextables: [{
7904
8323
  refName: string[];
7905
- contextable: (ctx: ICommonContext) => string;
8324
+ contextable: (ctx: IActionContext) => string;
7906
8325
  }];
7907
8326
  }): void;
7908
8327
  resolve(ref: Resolvable | string[], ...rest: string[]): string;
7909
- operate(name: string, queries?: Contextable<ICommonContext, string | string[]>): Operation;
8328
+ operate(name: string, queryOrConfig?: Contextable<IActionContext, string | string[]> | dataform.ActionConfig.OperationConfig): Operation;
7910
8329
  publish(name: string, queryOrConfig?: Contextable<ITableContext, string> | dataform.ActionConfig.TableConfig | dataform.ActionConfig.ViewConfig | dataform.ActionConfig.IncrementalTableConfig | ILegacyTableConfig | any): Table | IncrementalTable | View;
7911
- assert(name: string, query?: AContextable<string>): Assertion;
7912
- declare(dataset: dataform.ITarget): Declaration;
8330
+ assert(name: string, queryOrConfig?: AContextable<string> | dataform.ActionConfig.AssertionConfig): Assertion;
8331
+ declare(config: dataform.ActionConfig.DeclarationConfig | any): Declaration;
7913
8332
  test(name: string): Test;
7914
- notebook(name: string): Notebook;
8333
+ notebook(config: dataform.ActionConfig.NotebookConfig): Notebook;
7915
8334
  compileError(err: Error | string, path?: string, actionTarget?: dataform.ITarget): void;
7916
8335
  compile(): dataform.CompiledGraph;
7917
8336
  compileToBase64(): string;
@@ -7924,7 +8343,6 @@ declare class Session {
7924
8343
  private compileGraphChunk;
7925
8344
  private fullyQualifyDependencies;
7926
8345
  private alterActionName;
7927
- private checkTableConfigValidity;
7928
8346
  private checkTestNameUniqueness;
7929
8347
  private checkCircularity;
7930
8348
  private removeNonUniqueActionsFromCompiledGraph;
@@ -7935,13 +8353,13 @@ declare class ActionMap {
7935
8353
  private byDatabaseAndName;
7936
8354
  private byDatabaseSchemaAndName;
7937
8355
  constructor(actions: Action[]);
7938
- set(actionTarget: ITarget, assertionTarget: Action): void;
8356
+ set(actionTarget: dataform.ITarget, assertionTarget: Action): void;
7939
8357
  find(target: dataform.ITarget): Action[];
7940
8358
  private setByNameLevel;
7941
8359
  private setBySchemaLevel;
7942
8360
  }
7943
8361
 
7944
- declare const version = "3.0.13";
8362
+ declare const version = "3.0.15";
7945
8363
 
7946
8364
  declare const session: Session;
7947
8365
  declare const supportedFeatures: dataform.SupportedFeatures[];