-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(fivetran_sdk): Create a separate folder for V1 examples (#79)
* create folder for v1 examples * gitignore changes * readme changes * add proto files to parent folder * fix(github_workflow): update the workflow * argument change --------- Co-authored-by: Satvik Patil <[email protected]> Co-authored-by: Varun Dhall <[email protected]>
- Loading branch information
1 parent
58b7aa3
commit 09a813c
Showing
56 changed files
with
411 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,19 +32,19 @@ jobs: | |
run: python -m pip install --upgrade pip setuptools wheel | ||
|
||
- name: Install Python connector requirements | ||
working-directory: examples/connector/python | ||
working-directory: v1_examples/connector/python | ||
run: pip install -r requirements.txt | ||
|
||
- name: Run Python connector build script | ||
working-directory: examples/connector/python | ||
working-directory: v1_examples/connector/python | ||
run: ./build.sh | ||
|
||
- name: Install Python destination requirements | ||
working-directory: examples/destination/python | ||
working-directory: v1_examples/destination/python | ||
run: pip install -r requirements.txt | ||
|
||
- name: Run Python destination build script | ||
working-directory: examples/destination/python | ||
working-directory: v1_examples/destination/python | ||
run: ./build.sh | ||
|
||
- name: Set up Go | ||
|
@@ -58,45 +58,45 @@ jobs: | |
version: "23.2" | ||
|
||
- name: Set up protobuf for Go | ||
working-directory: examples/connector/golang | ||
working-directory: v1_examples/connector/golang | ||
run: go install google.golang.org/protobuf/cmd/[email protected] | ||
|
||
- name: Set up protoc-gen-go | ||
working-directory: examples/connector/golang | ||
working-directory: v1_examples/connector/golang | ||
run: go install google.golang.org/grpc/cmd/[email protected] | ||
|
||
- name: Set up Go protoc path | ||
working-directory: examples/connector/golang | ||
working-directory: v1_examples/connector/golang | ||
run: export PATH="$PATH:$(go env GOPATH)/bin" | ||
|
||
- name: Verify dependencies | ||
working-directory: examples/connector/golang | ||
working-directory: v1_examples/connector/golang | ||
run: go mod verify | ||
|
||
- name: Build Go connector | ||
working-directory: examples/connector/golang | ||
working-directory: v1_examples/connector/golang | ||
run: scripts/build.sh | ||
|
||
- name: Run go vet | ||
working-directory: examples/connector/golang | ||
working-directory: v1_examples/connector/golang | ||
run: go vet ./... | ||
|
||
- name: Install staticcheck | ||
run: go install honnef.co/go/tools/cmd/staticcheck@latest | ||
|
||
- name: Run staticcheck | ||
working-directory: examples/connector/golang | ||
working-directory: v1_examples/connector/golang | ||
run: staticcheck ./... | ||
|
||
- name: Install golint | ||
run: go install golang.org/x/lint/golint@latest | ||
|
||
- name: Run golint | ||
working-directory: examples/connector/golang | ||
working-directory: v1_examples/connector/golang | ||
run: golint ./... | ||
|
||
- name: Run tests | ||
working-directory: examples/connector/golang | ||
working-directory: v1_examples/connector/golang | ||
run: go test -race -vet=off ./... | ||
|
||
- name: Setup Gradle | ||
|
@@ -105,17 +105,17 @@ jobs: | |
gradle-version: 8.5 | ||
|
||
- name: Run Java connector copyProtos | ||
working-directory: examples/connector/java | ||
working-directory: v1_examples/connector/java | ||
run: gradle copyProtos | ||
|
||
- name: Run Java connector test with Gradle Wrapper | ||
working-directory: examples/connector/java | ||
working-directory: v1_examples/connector/java | ||
run: gradle build | ||
|
||
- name: Run Java destination copyProtos | ||
working-directory: examples/destination/java | ||
working-directory: v1_examples/destination/java | ||
run: gradle copyProtos | ||
|
||
- name: Run Java destination test with Gradle Wrapper | ||
working-directory: examples/destination/java | ||
working-directory: v1_examples/destination/java | ||
run: gradle build |
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 was deleted.
Oops, something went wrong.
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,133 @@ | ||
syntax = "proto3"; | ||
option optimize_for = SPEED; | ||
option java_multiple_files = true; | ||
option go_package = "fivetran.com/fivetran_sdk"; | ||
package fivetran_sdk; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
message ConfigurationFormRequest {} | ||
|
||
message ConfigurationFormResponse { | ||
bool schema_selection_supported = 1; | ||
bool table_selection_supported = 2; | ||
repeated FormField fields = 3; | ||
repeated ConfigurationTest tests = 4; | ||
} | ||
|
||
message FormField { | ||
string name = 1; | ||
string label = 2; | ||
bool required = 3; | ||
optional string description = 4; | ||
oneof type { | ||
TextField text_field = 5; | ||
DropdownField dropdown_field = 6; | ||
ToggleField toggle_field = 7; | ||
} | ||
} | ||
|
||
message DropdownField { | ||
repeated string dropdown_field = 1; | ||
} | ||
|
||
message ToggleField {} | ||
|
||
enum TextField { | ||
PlainText = 0; | ||
Password = 1; | ||
Hidden = 2; | ||
} | ||
|
||
message ConfigurationTest { | ||
string name = 1; // unique identifier for the test | ||
string label = 2; // A few words indicating what we are testing, e.g. 'Connecting to database' | ||
} | ||
|
||
message TestRequest { | ||
string name = 1; | ||
map<string, string> configuration = 2; | ||
} | ||
|
||
message TestResponse { | ||
oneof response { | ||
bool success = 1; | ||
string failure = 2; | ||
// potential future warning | ||
} | ||
} | ||
|
||
message SchemaList { | ||
repeated Schema schemas = 1; | ||
} | ||
|
||
message TableList { | ||
repeated Table tables = 1; | ||
} | ||
|
||
message Schema { | ||
string name = 1; | ||
repeated Table tables = 2; | ||
} | ||
|
||
enum DataType { | ||
UNSPECIFIED = 0; | ||
BOOLEAN = 1; | ||
SHORT = 2; | ||
INT = 3; | ||
LONG = 4; | ||
DECIMAL = 5; | ||
FLOAT = 6; | ||
DOUBLE = 7; | ||
NAIVE_DATE = 8; | ||
NAIVE_DATETIME = 9; | ||
UTC_DATETIME = 10; | ||
BINARY = 11; | ||
XML = 12; | ||
STRING = 13; | ||
JSON = 14; | ||
} | ||
|
||
message DecimalParams { | ||
uint32 precision = 1; | ||
uint32 scale = 2; | ||
} | ||
|
||
enum OpType { | ||
UPSERT = 0; | ||
UPDATE = 1; | ||
DELETE = 2; | ||
TRUNCATE = 3; | ||
} | ||
|
||
message ValueType { | ||
oneof inner { | ||
bool null = 1; | ||
bool bool = 2; | ||
int32 short = 3; | ||
int32 int = 4; | ||
int64 long = 5; | ||
float float = 6; | ||
double double = 7; | ||
google.protobuf.Timestamp naive_date = 8; | ||
google.protobuf.Timestamp naive_datetime = 9; | ||
google.protobuf.Timestamp utc_datetime = 10; | ||
string decimal = 11; | ||
bytes binary = 12; | ||
string string = 13; | ||
string json = 14; | ||
string xml = 15; | ||
} | ||
} | ||
|
||
message Table { | ||
string name = 1; | ||
repeated Column columns = 2; | ||
} | ||
|
||
message Column { | ||
string name = 1; | ||
DataType type = 2; | ||
bool primary_key = 3; | ||
optional DecimalParams decimal = 4; | ||
} |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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 @@ | ||
cp ../../*.proto proto/ |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.