@sqlanvil/core 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/configs.proto CHANGED
@@ -657,6 +657,54 @@ message ActionConfig {
657
657
  string reservation = 13;
658
658
  }
659
659
 
660
+ // The user-facing `export: {}` block on a `type: "export"` action.
661
+ message ExportOptions {
662
+ // Destination folder/prefix URI: gs:// | s3:// | local:// | relative/absolute path.
663
+ string location = 1;
664
+ // "parquet" | "csv" | "json" (json = JSONL).
665
+ string format = 2;
666
+ // Overwrite an existing object/file. Defaults to true (defaulted in core when absent).
667
+ bool overwrite = 3;
668
+ // Output base filename; defaults to the action name.
669
+ string filename = 4;
670
+ // Format-specific passthrough options (e.g. compression, csv header/delimiter).
671
+ map<string, string> options = 5;
672
+ }
673
+
674
+ // Configuration for a `type: "export"` action: writes a SELECT result to a
675
+ // Parquet/CSV/JSON file at a cloud or local location.
676
+ message ExportConfig {
677
+ // The name of the export.
678
+ string name = 1;
679
+
680
+ // The dataset (schema) used to qualify the export's target name.
681
+ string dataset = 2;
682
+
683
+ // The Google Cloud project (database) of the export.
684
+ string project = 3;
685
+
686
+ // Targets of actions that this action is dependent on.
687
+ repeated Target dependency_targets = 4;
688
+
689
+ // Path to the source file that the contents of the action is loaded from.
690
+ string filename = 5;
691
+
692
+ // A list of user-defined tags with which the action should be labeled.
693
+ repeated string tags = 6;
694
+
695
+ // If set to true, this action will not be executed.
696
+ bool disabled = 7;
697
+
698
+ // Description of the export.
699
+ string description = 8;
700
+
701
+ // If true, this action only depends on data from explicitly-declared dependencies.
702
+ bool hermetic = 9;
703
+
704
+ // The export destination + format options (the `export: {}` block).
705
+ ExportOptions export = 10;
706
+ }
707
+
660
708
  message DeclarationConfig {
661
709
  // The name of the declaration.
662
710
  string name = 1;
@@ -781,6 +829,7 @@ message ActionConfig {
781
829
  RealtimePublicationConfig realtime_publication = 10;
782
830
  ForeignWrapperConfig foreign_wrapper = 11;
783
831
  VectorIndexConfig vector_index = 12;
832
+ ExportConfig export = 13;
784
833
  }
785
834
 
786
835
  message RlsPolicyConfig {
package/core.proto CHANGED
@@ -263,6 +263,30 @@ message Operation {
263
263
  reserved 1, 2, 4, 5;
264
264
  }
265
265
 
266
+ // A compiled file export: writes `query` to a Parquet/CSV/JSON file at `location`.
267
+ message Export {
268
+ Target target = 1;
269
+ Target canonical_target = 2;
270
+ repeated Target dependency_targets = 3;
271
+ ActionHermeticity hermeticity = 4;
272
+ bool disabled = 5;
273
+ repeated string tags = 6;
274
+ ActionDescriptor action_descriptor = 7;
275
+ // The SELECT to export (refs already resolved to warehouse identifiers).
276
+ string query = 8;
277
+ // Destination folder/prefix URI.
278
+ string location = 9;
279
+ // "parquet" | "csv" | "json".
280
+ string format = 10;
281
+ bool overwrite = 11;
282
+ // Output base filename; defaults to the action name.
283
+ string filename = 12;
284
+ map<string, string> options = 13;
285
+ // Source file path (generated).
286
+ string file_name = 14;
287
+ string jit_code = 15;
288
+ }
289
+
266
290
  message Assertion {
267
291
  Target target = 8;
268
292
  Target canonical_target = 13;
@@ -431,6 +455,7 @@ message CompiledGraph {
431
455
  repeated Test tests = 8;
432
456
  repeated Notebook notebooks = 12;
433
457
  repeated DataPreparation data_preparations = 13;
458
+ repeated Export exports = 14;
434
459
 
435
460
  GraphErrors graph_errors = 7;
436
461
 
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "version": "1.7.0",
37
+ "version": "1.8.0",
38
38
  "name": "@sqlanvil/core",
39
39
  "description": "sqlanvil core API.",
40
40
  "main": "bundle.js"