@dataform/core 3.0.0-beta.3 → 3.0.0-beta.5

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
@@ -28,6 +28,7 @@ interface ITargetableConfig {
28
28
  interface IDependenciesConfig {
29
29
  dependencies?: Resolvable | Resolvable[];
30
30
  hermetic?: boolean;
31
+ dependOnDependencyAssertions?: boolean;
31
32
  }
32
33
  interface IDocumentableConfig {
33
34
  columns?: IColumnsDescriptor;
@@ -47,6 +48,7 @@ interface ITarget {
47
48
  database?: string;
48
49
  schema?: string;
49
50
  name?: string;
51
+ includeDependentAssertions?: boolean;
50
52
  }
51
53
  declare type Resolvable = string | ITarget;
52
54
  declare type Contextable<Context, T> = T | ((ctx: Context) => T);
@@ -451,6 +453,9 @@ namespace dataform {
451
453
 
452
454
  /** Target name */
453
455
  name?: (string|null);
456
+
457
+ /** Target includeDependentAssertions */
458
+ includeDependentAssertions?: (boolean|null);
454
459
  }
455
460
 
456
461
  /** Represents a Target. */
@@ -471,6 +476,9 @@ namespace dataform {
471
476
  /** Target name. */
472
477
  public name: string;
473
478
 
479
+ /** Target includeDependentAssertions. */
480
+ public includeDependentAssertions: boolean;
481
+
474
482
  /**
475
483
  * Creates a new Target instance using the specified properties.
476
484
  * @param [properties] Properties to set
@@ -711,6 +719,9 @@ namespace dataform {
711
719
 
712
720
  /** TableConfig additionalOptions */
713
721
  additionalOptions?: ({ [k: string]: string }|null);
722
+
723
+ /** TableConfig dependOnDependencyAssertions */
724
+ dependOnDependencyAssertions?: (boolean|null);
714
725
  }
715
726
 
716
727
  /** Represents a TableConfig. */
@@ -773,6 +784,9 @@ namespace dataform {
773
784
  /** TableConfig additionalOptions. */
774
785
  public additionalOptions: { [k: string]: string };
775
786
 
787
+ /** TableConfig dependOnDependencyAssertions. */
788
+ public dependOnDependencyAssertions: boolean;
789
+
776
790
  /**
777
791
  * Creates a new TableConfig instance using the specified properties.
778
792
  * @param [properties] Properties to set
@@ -895,6 +909,9 @@ namespace dataform {
895
909
 
896
910
  /** ViewConfig additionalOptions */
897
911
  additionalOptions?: ({ [k: string]: string }|null);
912
+
913
+ /** ViewConfig dependOnDependencyAssertions */
914
+ dependOnDependencyAssertions?: (boolean|null);
898
915
  }
899
916
 
900
917
  /** Represents a ViewConfig. */
@@ -948,6 +965,9 @@ namespace dataform {
948
965
  /** ViewConfig additionalOptions. */
949
966
  public additionalOptions: { [k: string]: string };
950
967
 
968
+ /** ViewConfig dependOnDependencyAssertions. */
969
+ public dependOnDependencyAssertions: boolean;
970
+
951
971
  /**
952
972
  * Creates a new ViewConfig instance using the specified properties.
953
973
  * @param [properties] Properties to set
@@ -1088,6 +1108,9 @@ namespace dataform {
1088
1108
 
1089
1109
  /** IncrementalTableConfig additionalOptions */
1090
1110
  additionalOptions?: ({ [k: string]: string }|null);
1111
+
1112
+ /** IncrementalTableConfig dependOnDependencyAssertions */
1113
+ dependOnDependencyAssertions?: (boolean|null);
1091
1114
  }
1092
1115
 
1093
1116
  /** Represents an IncrementalTableConfig. */
@@ -1159,6 +1182,9 @@ namespace dataform {
1159
1182
  /** IncrementalTableConfig additionalOptions. */
1160
1183
  public additionalOptions: { [k: string]: string };
1161
1184
 
1185
+ /** IncrementalTableConfig dependOnDependencyAssertions. */
1186
+ public dependOnDependencyAssertions: boolean;
1187
+
1162
1188
  /**
1163
1189
  * Creates a new IncrementalTableConfig instance using the specified properties.
1164
1190
  * @param [properties] Properties to set
@@ -1408,6 +1434,9 @@ namespace dataform {
1408
1434
 
1409
1435
  /** OperationConfig columns */
1410
1436
  columns?: (dataform.ActionConfig.IColumnDescriptor[]|null);
1437
+
1438
+ /** OperationConfig dependOnDependencyAssertions */
1439
+ dependOnDependencyAssertions?: (boolean|null);
1411
1440
  }
1412
1441
 
1413
1442
  /** Represents an OperationConfig. */
@@ -1449,6 +1478,9 @@ namespace dataform {
1449
1478
  /** OperationConfig columns. */
1450
1479
  public columns: dataform.ActionConfig.IColumnDescriptor[];
1451
1480
 
1481
+ /** OperationConfig dependOnDependencyAssertions. */
1482
+ public dependOnDependencyAssertions: boolean;
1483
+
1452
1484
  /**
1453
1485
  * Creates a new OperationConfig instance using the specified properties.
1454
1486
  * @param [properties] Properties to set
@@ -1674,6 +1706,9 @@ namespace dataform {
1674
1706
 
1675
1707
  /** NotebookConfig description */
1676
1708
  description?: (string|null);
1709
+
1710
+ /** NotebookConfig dependOnDependencyAssertions */
1711
+ dependOnDependencyAssertions?: (boolean|null);
1677
1712
  }
1678
1713
 
1679
1714
  /** Represents a NotebookConfig. */
@@ -1709,6 +1744,9 @@ namespace dataform {
1709
1744
  /** NotebookConfig description. */
1710
1745
  public description: string;
1711
1746
 
1747
+ /** NotebookConfig dependOnDependencyAssertions. */
1748
+ public dependOnDependencyAssertions: boolean;
1749
+
1712
1750
  /**
1713
1751
  * Creates a new NotebookConfig instance using the specified properties.
1714
1752
  * @param [properties] Properties to set
@@ -2165,6 +2203,9 @@ namespace dataform {
2165
2203
 
2166
2204
  /** Target name */
2167
2205
  name?: (string|null);
2206
+
2207
+ /** Target includeDependentAssertions */
2208
+ includeDependentAssertions?: (boolean|null);
2168
2209
  }
2169
2210
 
2170
2211
  /** Represents a Target. */
@@ -2185,6 +2226,9 @@ namespace dataform {
2185
2226
  /** Target name. */
2186
2227
  public name: string;
2187
2228
 
2229
+ /** Target includeDependentAssertions. */
2230
+ public includeDependentAssertions: boolean;
2231
+
2188
2232
  /**
2189
2233
  * Creates a new Target instance using the specified properties.
2190
2234
  * @param [properties] Properties to set
@@ -6777,9 +6821,11 @@ declare class Declaration extends ActionBuilder<dataform.Declaration> {
6777
6821
  declare class Notebook extends ActionBuilder<dataform.Notebook> {
6778
6822
  session: Session;
6779
6823
  proto: dataform.INotebook;
6824
+ dependOnDependencyAssertions: boolean;
6780
6825
  constructor(session?: Session, config?: dataform.ActionConfig.NotebookConfig, configPath?: string);
6781
6826
  ipynb(contents: object): Notebook;
6782
6827
  config(config: any): this;
6828
+ dependencies(value: Resolvable | Resolvable[]): this;
6783
6829
  getFileName(): string;
6784
6830
  getTarget(): dataform.Target;
6785
6831
  compile(): dataform.Notebook;
@@ -6791,6 +6837,7 @@ interface IOperationConfig extends IActionConfig, IDependenciesConfig, IDocument
6791
6837
  declare class Operation extends ActionBuilder<dataform.Operation> {
6792
6838
  proto: dataform.IOperation;
6793
6839
  session: Session;
6840
+ dependOnDependencyAssertions: boolean;
6794
6841
  private contextableQueries;
6795
6842
  constructor(session?: Session, config?: dataform.ActionConfig.OperationConfig, configPath?: string);
6796
6843
  config(config: IOperationConfig): this;
@@ -6804,6 +6851,7 @@ declare class Operation extends ActionBuilder<dataform.Operation> {
6804
6851
  columns(columns: IColumnsDescriptor): this;
6805
6852
  database(database: string): this;
6806
6853
  schema(schema: string): this;
6854
+ setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
6807
6855
  getFileName(): string;
6808
6856
  getTarget(): dataform.Target;
6809
6857
  compile(): dataform.Operation;
@@ -6860,6 +6908,7 @@ interface ITableContext extends ICommonContext {
6860
6908
  declare class Table extends ActionBuilder<dataform.Table> {
6861
6909
  proto: dataform.ITable;
6862
6910
  session: Session;
6911
+ dependOnDependencyAssertions: boolean;
6863
6912
  contextableQuery: Contextable<ITableContext, string>;
6864
6913
  private contextableWhere;
6865
6914
  private contextablePreOps;
@@ -6886,6 +6935,7 @@ declare class Table extends ActionBuilder<dataform.Table> {
6886
6935
  database(database: string): this;
6887
6936
  schema(schema: string): this;
6888
6937
  assertions(assertions: ITableAssertions): this;
6938
+ setDependOnDependencyAssertions(dependOnDependencyAssertions: boolean): this;
6889
6939
  getFileName(): string;
6890
6940
  getTarget(): dataform.Target;
6891
6941
  compile(): dataform.Table;
@@ -6972,6 +7022,7 @@ declare type SqlxConfig = ((ITableConfig & {
6972
7022
  };
6973
7023
  declare abstract class ActionBuilder<T> {
6974
7024
  session: Session;
7025
+ includeAssertionsForDependency: Map<string, boolean>;
6975
7026
  constructor(session?: Session);
6976
7027
  applySessionCanonicallyToTarget(targetFromConfig: dataform.Target): dataform.Target;
6977
7028
  applySessionToTarget(targetFromConfig: dataform.Target, fileName?: string): dataform.Target;
@@ -6996,14 +7047,15 @@ declare class Session {
6996
7047
  config: dataform.IProjectConfig;
6997
7048
  canonicalConfig: dataform.IProjectConfig;
6998
7049
  actions: Action[];
6999
- indexedActions: ActionIndex;
7050
+ indexedActions: ActionMap;
7000
7051
  tests: {
7001
7052
  [name: string]: Test;
7002
7053
  };
7054
+ actionAssertionMap: ActionMap;
7003
7055
  graphErrors: dataform.IGraphErrors;
7004
7056
  constructor(rootDir?: string, projectConfig?: dataform.IProjectConfig, originalProjectConfig?: dataform.IProjectConfig);
7005
7057
  init(rootDir: string, projectConfig?: dataform.IProjectConfig, originalProjectConfig?: dataform.IProjectConfig): void;
7006
- get projectConfig(): Pick<dataform.IProjectConfig, "warehouse" | "defaultDatabase" | "defaultSchema" | "assertionSchema" | "databaseSuffix" | "schemaSuffix" | "tablePrefix" | "vars">;
7058
+ get projectConfig(): Pick<dataform.IProjectConfig, "warehouse" | "defaultDatabase" | "defaultSchema" | "defaultLocation" | "assertionSchema" | "databaseSuffix" | "schemaSuffix" | "tablePrefix" | "vars">;
7007
7059
  compilationSql(): CompilationSql;
7008
7060
  sqlxAction(actionOptions: {
7009
7061
  sqlxConfig: SqlxConfig;
@@ -7041,16 +7093,19 @@ declare class Session {
7041
7093
  private checkCircularity;
7042
7094
  private removeNonUniqueActionsFromCompiledGraph;
7043
7095
  }
7044
- declare class ActionIndex {
7045
- private readonly byName;
7046
- private readonly bySchemaAndName;
7047
- private readonly byDatabaseAndName;
7048
- private readonly byDatabaseSchemaAndName;
7096
+ declare class ActionMap {
7097
+ private byName;
7098
+ private bySchemaAndName;
7099
+ private byDatabaseAndName;
7100
+ private byDatabaseSchemaAndName;
7049
7101
  constructor(actions: Action[]);
7102
+ set(actionTarget: ITarget, assertionTarget: Action): void;
7050
7103
  find(target: dataform.ITarget): Action[];
7104
+ private setByNameLevel;
7105
+ private setBySchemaLevel;
7051
7106
  }
7052
7107
 
7053
- declare const version = "3.0.0-beta.3";
7108
+ declare const version = "3.0.0-beta.5";
7054
7109
 
7055
7110
  declare const session: Session;
7056
7111
  declare const supportedFeatures: dataform.SupportedFeatures[];