@sqlanvil/core 1.11.0 → 1.12.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/bundle.d.ts +590 -3
- package/bundle.js +1 -1
- package/configs.proto +50 -0
- package/core.proto +23 -0
- package/package.json +1 -1
package/configs.proto
CHANGED
|
@@ -710,6 +710,55 @@ message ActionConfig {
|
|
|
710
710
|
ExportOptions export = 10;
|
|
711
711
|
}
|
|
712
712
|
|
|
713
|
+
// The user-facing `import: {}` block on a `type: "import"` action.
|
|
714
|
+
message ImportOptions {
|
|
715
|
+
// Source file/glob/URI to read: gs:// | s3:// | local:// | relative/absolute path.
|
|
716
|
+
// Used verbatim (unlike export, where the filename is derived) — point it at the exact
|
|
717
|
+
// file or glob (e.g. gs://bucket/orders/*.parquet).
|
|
718
|
+
string location = 1;
|
|
719
|
+
// "parquet" | "csv" | "json" (json = JSONL).
|
|
720
|
+
string format = 2;
|
|
721
|
+
// Replace the destination table (drop + create). Defaults to true. When false, rows are
|
|
722
|
+
// appended (INSERT … SELECT) into an existing table.
|
|
723
|
+
bool overwrite = 3;
|
|
724
|
+
// Format-specific passthrough options (reserved for future reader options).
|
|
725
|
+
map<string, string> options = 4;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// Configuration for a `type: "import"` action: loads a Parquet/CSV/JSON file into a table in
|
|
729
|
+
// the warehouse (the inverse of `type: "export"`). The resulting table is ref()-able.
|
|
730
|
+
message ImportConfig {
|
|
731
|
+
// The name of the import (the destination table name).
|
|
732
|
+
string name = 1;
|
|
733
|
+
|
|
734
|
+
// The dataset (schema) used to qualify the import's target name.
|
|
735
|
+
string dataset = 2;
|
|
736
|
+
|
|
737
|
+
// The Google Cloud project (database) of the import.
|
|
738
|
+
string project = 3;
|
|
739
|
+
|
|
740
|
+
// Targets of actions that this action is dependent on.
|
|
741
|
+
repeated Target dependency_targets = 4;
|
|
742
|
+
|
|
743
|
+
// Path to the source .sqlx file the action is defined in (generated).
|
|
744
|
+
string filename = 5;
|
|
745
|
+
|
|
746
|
+
// A list of user-defined tags with which the action should be labeled.
|
|
747
|
+
repeated string tags = 6;
|
|
748
|
+
|
|
749
|
+
// If set to true, this action will not be executed.
|
|
750
|
+
bool disabled = 7;
|
|
751
|
+
|
|
752
|
+
// Description of the import.
|
|
753
|
+
string description = 8;
|
|
754
|
+
|
|
755
|
+
// If true, this action only depends on data from explicitly-declared dependencies.
|
|
756
|
+
bool hermetic = 9;
|
|
757
|
+
|
|
758
|
+
// The import source + format options (the `import: {}` block).
|
|
759
|
+
ImportOptions import = 10;
|
|
760
|
+
}
|
|
761
|
+
|
|
713
762
|
message DeclarationConfig {
|
|
714
763
|
// The name of the declaration.
|
|
715
764
|
string name = 1;
|
|
@@ -835,6 +884,7 @@ message ActionConfig {
|
|
|
835
884
|
ForeignWrapperConfig foreign_wrapper = 11;
|
|
836
885
|
VectorIndexConfig vector_index = 12;
|
|
837
886
|
ExportConfig export = 13;
|
|
887
|
+
ImportConfig import = 14;
|
|
838
888
|
}
|
|
839
889
|
|
|
840
890
|
message RlsPolicyConfig {
|
package/core.proto
CHANGED
|
@@ -287,6 +287,28 @@ message Export {
|
|
|
287
287
|
string jit_code = 15;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
+
// A compiled file import: loads the file at `location` into the table at `target`. The inverse
|
|
291
|
+
// of Export — a producer whose target is ref()-able by downstream actions.
|
|
292
|
+
message Import {
|
|
293
|
+
Target target = 1;
|
|
294
|
+
Target canonical_target = 2;
|
|
295
|
+
repeated Target dependency_targets = 3;
|
|
296
|
+
ActionHermeticity hermeticity = 4;
|
|
297
|
+
bool disabled = 5;
|
|
298
|
+
repeated string tags = 6;
|
|
299
|
+
ActionDescriptor action_descriptor = 7;
|
|
300
|
+
// Source file/glob/URI to read (used verbatim).
|
|
301
|
+
string location = 8;
|
|
302
|
+
// "parquet" | "csv" | "json".
|
|
303
|
+
string format = 9;
|
|
304
|
+
// Replace (drop + create) vs append (INSERT … SELECT). Defaults true.
|
|
305
|
+
bool overwrite = 10;
|
|
306
|
+
map<string, string> options = 11;
|
|
307
|
+
// Source .sqlx file path (generated).
|
|
308
|
+
string file_name = 12;
|
|
309
|
+
string jit_code = 13;
|
|
310
|
+
}
|
|
311
|
+
|
|
290
312
|
message Assertion {
|
|
291
313
|
Target target = 8;
|
|
292
314
|
Target canonical_target = 13;
|
|
@@ -456,6 +478,7 @@ message CompiledGraph {
|
|
|
456
478
|
repeated Notebook notebooks = 12;
|
|
457
479
|
repeated DataPreparation data_preparations = 13;
|
|
458
480
|
repeated Export exports = 14;
|
|
481
|
+
repeated Import imports = 16;
|
|
459
482
|
|
|
460
483
|
GraphErrors graph_errors = 7;
|
|
461
484
|
|