Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: oauth support in databricks destination #1912

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/configurations/destinations/deltalake/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"port",
"path",
"token",
"useOauth",
"oauthClientId",
"oauthClientSecret",
"catalog",
"namespace",
"bucketProvider",
Expand Down Expand Up @@ -130,7 +133,8 @@
"accountKey",
"sasToken",
"credentials",
"token"
"token",
"oauthClientSecret"
],
"supportedConnectionModes": {
"android": ["cloud"],
Expand Down
48 changes: 43 additions & 5 deletions src/configurations/destinations/deltalake/schema.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"required": ["host", "port", "path", "token", "syncFrequency", "bucketProvider"],
"required": ["host", "port", "path", "syncFrequency", "bucketProvider"],
"properties": {
"host": {
"type": "string",
Expand All @@ -16,10 +16,6 @@
"type": "string",
"pattern": "(^env[.].+)|^(.{1,100})$"
},
"token": {
"type": "string",
"pattern": "(^env[.].+)|^(.{1,100})$"
},
"catalog": {
"type": "string",
"pattern": "(^env[.].*)|^(.*)$"
Expand Down Expand Up @@ -912,6 +908,48 @@
}
},
"allOf": [
{
"if": {
"properties": {
"useOauth": {
"const": false
}
},
"required": ["useOauth"]
},
"then": {
"properties": {
"token": {
"type": "string",
"pattern": "(^env[.].+)|^(.{1,100})$"
}
},
"required": ["token"]
}
},
{
"if": {
"properties": {
"useOauth": {
"const": true
}
},
"required": ["useOauth"]
},
"then": {
"properties": {
"oauthClientId": {
"type": "string",
"pattern": "^(.{1,100})$"
},
"oauthClientSecret": {
"type": "string",
"pattern": "^(.{1,100})$"
}
},
"required": ["oauthClientId", "oauthClientSecret"]
}
},
{
"if": {
"properties": {
Expand Down
39 changes: 38 additions & 1 deletion src/configurations/destinations/deltalake/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
"placeholder": "sql/protocolv1/o/<ordId>/<clusterId> or /sql/1.0/endpoints/<endpointId>",
"required": true
},
{
"type": "checkbox",
"label": "Use M2M OAuth",
"value": "useOauth",
"default": false
},
{
"type": "textInput",
"label": "Personal Access Token",
Expand All @@ -38,7 +44,38 @@
"regexErrorMessage": "Invalid Access Token",
"placeholder": "e.g: <personal-access-token>",
"required": true,
"secret": true
"secret": true,
"preRequisiteField": {
"name": "useOauth",
"selectedValue": false
}
},
{
"type": "textInput",
"label": "Client ID",
"value": "oauthClientId",
"regex": "^(.{1,100})$",
"regexErrorMessage": "Invalid Client ID",
"placeholder": "e.g: <client-id>",
"required": true,
"preRequisiteField": {
"name": "useOauth",
"selectedValue": true
}
},
{
"type": "textInput",
"label": "Client Secret",
"value": "oauthClientSecret",
"regex": "^(.{1,100})$",
"regexErrorMessage": "Invalid Client Secret",
"placeholder": "e.g: <client-secret>",
"required": true,
"secret": true,
"preRequisiteField": {
"name": "useOauth",
"selectedValue": true
}
},
{
"type": "checkbox",
Expand Down
Loading