forked from opensearch-project/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from Bit-Quill/revert-19-add-github-workflow-p…
…ack-bi-connectors-AOS-253 Revert "Add GitHub workflow to pack BI connectors"
- Loading branch information
Showing
25 changed files
with
597 additions
and
60 deletions.
There are no files selected for viewing
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,8 @@ | ||
## opensearch_sql_odbc | ||
|
||
The connector files in `opensearch_sql_odbc` can be used to connect to OpenSearch server in Tableau. | ||
|
||
* These connector files remove and modify a set of unsupported functions and operations. | ||
* It includes set of capabilities to customize and tune connector behavior | ||
|
||
To use this connector with Tableau, [Package the connector](https://tableau.github.io/connector-plugin-sdk/docs/package-sign) and [Run Packaged Connector (TACO file)](https://tableau.github.io/connector-plugin-sdk/docs/run-taco) |
16 changes: 16 additions & 0 deletions
16
bi-connectors/TableauConnector/opensearch_sql_odbc/connection-dialog.tcd
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,16 @@ | ||
<connection-dialog class='opensearch_sql_odbc'> | ||
<connection-config> | ||
<authentication-mode value='ComboBoxIntegrated' /> | ||
<authentication-options> | ||
<option name="None" value="NONE" default="true" /> | ||
<option name="Integrated" value="AWS_SIGV4" /> | ||
<option name="UsernameAndPassword" value="BASIC" /> | ||
</authentication-options> | ||
<port-prompt value="Port: " default="9200" /> | ||
<show-ssl-checkbox value="true" /> | ||
<vendor1-prompt value="Region: " /> | ||
<vendor2-prompt value="Additional Options: " /> | ||
<has-databases value="false" /> | ||
<has-schemas value="false" /> | ||
</connection-config> | ||
</connection-dialog> |
42 changes: 42 additions & 0 deletions
42
bi-connectors/TableauConnector/opensearch_sql_odbc/connectionBuilder.js
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,42 @@ | ||
(function dsbuilder(attr){ | ||
var params = {}; | ||
|
||
// Set host information in connection string | ||
params["SERVER"] = attr[connectionHelper.attributeServer]; | ||
params["PORT"] = attr[connectionHelper.attributePort]; | ||
|
||
// Set authentication values in connection string | ||
var authAttrValue = attr[connectionHelper.attributeAuthentication]; | ||
params["Auth"] = attr[connectionHelper.attributeAuthentication]; | ||
if (authAttrValue == "AWS_SIGV4"){ | ||
params["Region"] = attr[connectionHelper.attributeVendor1]; | ||
} else if (authAttrValue == "BASIC"){ | ||
params["UID"] = attr[connectionHelper.attributeUsername]; | ||
params["PWD"] = attr[connectionHelper.attributePassword]; | ||
} | ||
|
||
// Set SSL value in connection string | ||
if (attr[connectionHelper.attributeSSLMode] == "require"){ | ||
params["useSSL"] = "1"; | ||
} else { | ||
params["useSSL"] = "0"; | ||
} | ||
|
||
// Parse additional options and add in connection string | ||
var odbcConnectStringExtrasMap = {}; | ||
const attributeODBCConnectStringExtras = "vendor2"; | ||
if (attributeODBCConnectStringExtras in attr){ | ||
odbcConnectStringExtrasMap = connectionHelper.ParseODBCConnectString(attr[attributeODBCConnectStringExtras]); | ||
} | ||
for (var key in odbcConnectStringExtrasMap){ | ||
params[key] = odbcConnectStringExtrasMap[key]; | ||
} | ||
|
||
// Format the attributes as 'key=value' | ||
var formattedParams = []; | ||
formattedParams.push(connectionHelper.formatKeyValuePair(driverLocator.keywordDriver, driverLocator.locateDriver(attr))); | ||
for (var key in params){ | ||
formattedParams.push(connectionHelper.formatKeyValuePair(key, params[key])); | ||
} | ||
return formattedParams; | ||
}) |
27 changes: 27 additions & 0 deletions
27
bi-connectors/TableauConnector/opensearch_sql_odbc/connectionResolver.tdr
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,27 @@ | ||
<?xml version='1.0' encoding='utf-8' ?> | ||
<tdr class='opensearch_sql_odbc'> | ||
<connection-resolver> | ||
<connection-builder> | ||
<script file='connectionBuilder.js'/> | ||
</connection-builder> | ||
<connection-normalizer> | ||
<required-attributes> | ||
<attribute-list> | ||
<attr>server</attr> | ||
<attr>port</attr> | ||
<attr>authentication</attr> | ||
<attr>username</attr> | ||
<attr>password</attr> | ||
<attr>sslmode</attr> | ||
<attr>vendor1</attr> | ||
<attr>vendor2</attr> | ||
</attribute-list> | ||
</required-attributes> | ||
</connection-normalizer> | ||
</connection-resolver> | ||
<driver-resolver> | ||
<driver-match > | ||
<driver-name type='regex'>OpenSearch SQL ODBC*</driver-name> | ||
</driver-match> | ||
</driver-resolver> | ||
</tdr> |
Oops, something went wrong.