Skip to content

Commit

Permalink
feat: oauth support in databricks destination
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhar-rudder committed Feb 26, 2025
1 parent fe22b4b commit ced7305
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 6 deletions.
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
46 changes: 42 additions & 4 deletions src/configurations/destinations/deltalake/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ced7305

Please sign in to comment.