-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from Matts966/feature/proto
Add proto for gRPC service and struct schema reader
- Loading branch information
Showing
25 changed files
with
342 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
syntax = "proto2"; | ||
|
||
message File { | ||
required string name = 1; | ||
required string content = 2; | ||
} | ||
|
||
message AlphaDAGRequest { | ||
required bool warning_as_error = 1; | ||
required bool with_tables = 2; | ||
required bool with_functions = 3; | ||
required bool side_effect_first = 4; | ||
repeated File files = 5; | ||
} | ||
|
||
message AlphaDAGResponse { | ||
repeated string external_required_tables = 1; | ||
repeated string dag_dot_string = 2; | ||
optional string error = 3; | ||
} | ||
|
||
enum SupportedType { | ||
STRING = 0; | ||
INTEGER = 1; | ||
INT64 = 2; | ||
BOOLEAN = 3; | ||
BOOL = 4; | ||
FLOAT64 = 5; | ||
FLOAT = 6; | ||
NUMERIC = 7; | ||
BYTES = 8; | ||
TIMESTAMP = 9; | ||
TIME = 10; | ||
DATETIME = 11; | ||
DATE = 12; | ||
GEOGRAPHY = 13; | ||
RECORD = 14; | ||
} | ||
|
||
enum Mode { | ||
REPEATED = 0; | ||
NULLABLE = 1; | ||
REQUIRED = 2; | ||
} | ||
|
||
/* import "google/protobuf/any.proto"; */ | ||
|
||
message Column { | ||
required string name = 1; | ||
required SupportedType type = 2; | ||
required Mode mode = 3; | ||
// For record types | ||
repeated Column fields = 4; | ||
/* optional string description = 6; */ | ||
/* optional google.protobuf.Any policyTags = 7; */ | ||
} | ||
|
||
message TableSchema { | ||
required string table_name = 1; | ||
repeated Column columns = 2; | ||
} | ||
|
||
message AlphaCheckRequest { | ||
repeated TableSchema external_required_tables_schema = 1; | ||
required string dag_dot_string = 2; | ||
repeated File files = 3; | ||
} | ||
|
||
message AlphaCheckResponse { | ||
optional string error = 1; | ||
} | ||
|
||
service AlphaSQL { | ||
// Extract DAG from SQL files | ||
rpc AlphaDAG(AlphaDAGRequest) | ||
returns (AlphaDAGResponse) {} | ||
|
||
// Validate DAG | ||
rpc AlphaCheck(AlphaCheckRequest) | ||
returns (AlphaCheckResponse) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/sample-arbitrary-dependency-graph-with-drop-statement/insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
INSERT INTO `dataset.main` | ||
SELECT | ||
1; | ||
1, STRUCT("test", "", STRUCT(4)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Analyzing "samples/sample-ci/sample/create_datawarehouse3.sql" | ||
ERROR: INVALID_ARGUMENT: Table not found: `bigquery-public-data.samples.gsod` [at samples/sample-ci/sample/create_datawarehouse3.sql:5:3] | ||
catalog: | ||
dataset.main | ||
tablename1 | ||
tablename2 | ||
dataset.main |
Oops, something went wrong.