Skip to content

Commit

Permalink
materialize-snowflake: use snowpipe for delta update bindings (+jwt a…
Browse files Browse the repository at this point in the history
…uth)
  • Loading branch information
mdibaiee committed Feb 15, 2024
1 parent afe17b4 commit 6a456f8
Show file tree
Hide file tree
Showing 10 changed files with 765 additions and 136 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ require (
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
github.com/golang-sql/sqlexp v0.1.0 // indirect
github.com/golang/glog v1.1.2 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzq
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw=
github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
Expand Down
83 changes: 65 additions & 18 deletions materialize-snowflake/.snapshots/TestSpecification
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,14 @@
"type": "string",
"title": "Host URL",
"description": "The Snowflake Host used for the connection. Must include the account identifier and end in .snowflakecomputing.com. Example: orgname-accountname.snowflakecomputing.com (do not include the protocol).",
"order": 0,
"pattern": "^[^/:]+.snowflakecomputing.com$"
"order": 0
},
"account": {
"type": "string",
"title": "Account",
"description": "The Snowflake account identifier.",
"order": 1
},
"user": {
"type": "string",
"title": "User",
"description": "The Snowflake user login name.",
"order": 2
},
"password": {
"type": "string",
"title": "Password",
"description": "The password for the provided user.",
"order": 3,
"secret": true
},
"database": {
"type": "string",
"title": "Database",
Expand All @@ -53,6 +39,68 @@
"description": "The user role used to perform actions.",
"order": 7
},
"credentials": {
"oneOf": [
{
"properties": {
"auth_type": {
"type": "string",
"const": "user_password",
"default": "user_password"
},
"user": {
"type": "string",
"title": "User",
"description": "The Snowflake user login name",
"order": 1
},
"password": {
"type": "string",
"title": "Password",
"description": "The password for the provided user",
"order": 2,
"secret": true
}
},
"required": [
"auth_type",
"user",
"password"
],
"title": "User Password"
},
{
"properties": {
"auth_type": {
"type": "string",
"const": "jwt",
"default": "jwt"
},
"private_key": {
"type": "string",
"title": "Private Key",
"description": "Private Key to be used to sign the JWT token",
"multiline": true,
"order": 2,
"secret": true
}
},
"required": [
"auth_type",
"private_key"
],
"title": "Private Key (JWT)"
}
],
"type": "object",
"title": "Authentication",
"default": {
"auth_type": "user_password"
},
"discriminator": {
"propertyName": "auth_type"
}
},
"advanced": {
"properties": {
"updateDelay": {
Expand Down Expand Up @@ -80,10 +128,9 @@
"required": [
"host",
"account",
"user",
"password",
"database",
"schema"
"schema",
"credentials"
],
"title": "SQL Connection"
},
Expand Down
Loading

0 comments on commit 6a456f8

Please sign in to comment.