Skip to content

Commit

Permalink
Added support for latest version of DDN
Browse files Browse the repository at this point in the history
  • Loading branch information
kenstott committed Aug 23, 2024
1 parent 42149e2 commit 77eb7d9
Show file tree
Hide file tree
Showing 122 changed files with 3,408 additions and 630 deletions.
1,014 changes: 979 additions & 35 deletions Cargo.lock

Large diffs are not rendered by default.

55 changes: 36 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,8 @@ must_use_candidate = { level = "allow" }
wildcard_imports = { level = "allow" }

[workspace.dependencies]
indexmap = "2.2.6"
jni = { version = "0.21.1", features = ["invocation"] }
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.4" }
ndc-sdk = { git = "https://github.com/hasura/ndc-sdk-rs.git", tag = "v0.1.4" }
async-trait = "0.1.79"
axum = { version = "0.6.20", features = ["http2"] }
axum-extra = "0.8.0"
bytes = "1.6.0"
clap = { version = "4.5.4", features = ["derive", "env"] }
http = "0.2"
mime = "0.3.17"
opentelemetry = "0.22.0"
Expand All @@ -39,22 +32,46 @@ opentelemetry-otlp = { version = "0.15.0", features = ["reqwest-client", "gzip-t
opentelemetry-semantic-conventions = "0.14.0"
opentelemetry_sdk = { version = "0.22.1", features = ["rt-tokio"] }
opentelemetry-zipkin = "0.20.0"
prometheus = "0.13.3"
reqwest = "0.11.27"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = { version = "1.0.115", features = ["raw_value"] }
schemars = "0.8.1"
thiserror = "1.0"
tokio = { version = "1.36.0", features = ["fs", "macros", "rt-multi-thread", "signal"] }
tower-http = { version = "0.4.4", features = ["cors", "trace", "validate-request"] }
tracing = "0.1.40"
tracing-opentelemetry = "0.23.0"
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "env-filter", "fmt", "json"] }
url = "2.5.0"
dotenv = "0.15.0"
once_cell = "1.19.0"
anyhow = "1.0.86"
serde_yaml = "0.9"
ndc-models = { git = "https://github.com/hasura/ndc-spec.git", tag = "v0.1.5" }
ndc-sdk = { git = "https://github.com/hasura/ndc-sdk-rs.git", tag = "v0.2.2" }
ndc-test = { git = "https://github.com/hasura/ndc-spec.git", tag = "v0.1.5" }

anyhow = "1"
async-trait = "0.1"
axum = "0.6"
axum-test-helper = "0.3"
build-data = "0.2"
bytes = "1"
clap = "4"
env_logger = "0.11"
hyper = "0.14"
indexmap = "2"
insta = "1"
jsonschema = "0.17"
log = "0.4.22"
multimap = "0.9"
nonempty = "0.10"
percent-encoding = "2"
prometheus = "0.13"
ref-cast = "1"
reqwest = "0.11"
schemars = "0.8"
serde = "1"
serde_json = "1"
serde_yaml = "0.9"
similar-asserts = "1"
smol_str = "0.1"
sqlformat = "0.2"
sqlx = "0.7"
tempfile = "3"
build-data = "0.2"
test-each = "0.2"
thiserror = "1"
tokio = "1"
tracing = "0.1"
url = "2"
uuid = "1"
2 changes: 1 addition & 1 deletion adapters/arrow/dev.local.configuration.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4",
"version": "5",
"$schema": "schema.json",
"model_file_path": "./model.json",
"fixes": true
Expand Down
2 changes: 1 addition & 1 deletion adapters/arrow/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"Version": {
"type": "string",
"enum": [
"4"
"5"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion adapters/cassandra/dev.local.configuration.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4",
"version": "5",
"$schema": "schema.json",
"model": {
"version": "1.0",
Expand Down
24 changes: 24 additions & 0 deletions adapters/cassandra/root.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-----BEGIN CERTIFICATE-----
MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl
MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp
U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBd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5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp
VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY
WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion adapters/cassandra/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"Version": {
"type": "string",
"enum": [
"4"
"5"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion adapters/csv/configuration.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4",
"version": "5",
"$schema": "schema.json",
"model": {
"version": "1.0",
Expand Down
2 changes: 1 addition & 1 deletion adapters/csv/dev.local.configuration.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4",
"version": "5",
"$schema": "schema.json",
"model": {
"version": "1.0",
Expand Down
5 changes: 4 additions & 1 deletion adapters/csv/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"jdbcUrl": {
"type": "string"
},
"sqlDialectFactory": {
"type": "string"
},
"jdbcCatalog": {
"type": "string"
},
Expand Down Expand Up @@ -123,7 +126,7 @@
"Version": {
"type": "string",
"enum": [
"4"
"5"
]
}
}
Expand Down
6 changes: 6 additions & 0 deletions adapters/db2/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
JAR_DEPENDENCY_FOLDER=../../calcite-rs-jni/target/dependency
CALCITE_JAR=../../calcite-rs-jni/target/calcite-rs-jni-1.0-SNAPSHOT.jar
RUST_LOG=info
OTEL_LOGS_EXPORTER=console
OTEL_LOG_LEVEL=trace
LOG4J_CONFIGURATION_FILE=../../calcite-rs-jni/target/classes/log4j2.xml
File renamed without changes.
90 changes: 90 additions & 0 deletions adapters/db2/dev.local.configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"version": "5",
"$schema": "schema.json",
"model": {
"version": "1.0",
"defaultSchema": "db2",
"schemas": [
{
"type": "jdbc",
"name": "db2",
"jdbcUser": "db2inst1",
"jdbcPassword": "mypassword",
"jdbcUrl": "jdbc:db2://192.168.86.233:50000/testdb"
}
]
},
"model_file_path": "./model.json",
"fixes": true,
"metadata": {
"PROJECTS": {
"schema": "db2",
"name": "PROJECTS",
"columns": {
"PROJECTID": {
"name": "PROJECTID",
"scalarType": "INTEGER",
"nullable": false
},
"PROJECTNAME": {
"name": "PROJECTNAME",
"scalarType": "VARCHAR",
"nullable": true
},
"DEPARTMENTID": {
"name": "DEPARTMENTID",
"scalarType": "INTEGER",
"nullable": true
}
},
"primaryKeys": [],
"exportedKeys": []
},
"EMPLOYEES": {
"schema": "db2",
"name": "EMPLOYEES",
"columns": {
"FIRSTNAME": {
"name": "FIRSTNAME",
"scalarType": "VARCHAR",
"nullable": true
},
"LASTNAME": {
"name": "LASTNAME",
"scalarType": "VARCHAR",
"nullable": true
},
"EMPLOYEEID": {
"name": "EMPLOYEEID",
"scalarType": "INTEGER",
"nullable": false
},
"DEPARTMENTID": {
"name": "DEPARTMENTID",
"scalarType": "INTEGER",
"nullable": true
}
},
"primaryKeys": [],
"exportedKeys": []
},
"DEPARTMENTS": {
"schema": "db2",
"name": "DEPARTMENTS",
"columns": {
"DEPARTMENTNAME": {
"name": "DEPARTMENTNAME",
"scalarType": "VARCHAR",
"nullable": true
},
"DEPARTMENTID": {
"name": "DEPARTMENTID",
"scalarType": "INTEGER",
"nullable": false
}
},
"primaryKeys": [],
"exportedKeys": []
}
}
}
2 changes: 1 addition & 1 deletion config-templates/schema.json → adapters/db2/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"Version": {
"type": "string",
"enum": [
"4"
"5"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion adapters/file/configuration.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4",
"version": "5",
"$schema": "schema.json",
"model": {
"version": "1.0",
Expand Down
15 changes: 0 additions & 15 deletions adapters/file/connector-metadata.yaml

This file was deleted.

Loading

0 comments on commit 77eb7d9

Please sign in to comment.