This repository has been archived by the owner on Mar 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Tableau connector source files (#82)
* Login with basic auth * Add auth none *AWS auth addition
- Loading branch information
Showing
7 changed files
with
138 additions
and
7 deletions.
There are no files selected for viewing
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,14 @@ | ||
<connection-dialog class='odfe_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: " /> | ||
</connection-config> | ||
</connection-dialog> |
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; | ||
}) |
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='odfe_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'>ODFE SQL ODBC*</driver-name> | ||
</driver-match> | ||
</driver-resolver> | ||
</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,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<dialect name='OdfeSqlOdbcDialect' | ||
class='odfe_sql_odbc' | ||
base='MySQL41UnicodeDriverDialect' | ||
version='18.1'> | ||
</dialect> | ||
|
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,41 @@ | ||
<?xml version='1.0' encoding='utf-8' ?> | ||
|
||
<connector-plugin class='odfe_sql_odbc' superclass='odbc' plugin-version='0.2.0' name='ODFE SQL ODBC' version='18.1' min-version-tableau='2019.4'> | ||
<vendor-information> | ||
<company name="Amazon"/> | ||
<support-link url="https://github.com/opendistro-for-elasticsearch/sql-odbc"/> | ||
<driver-download-link url="https://github.com/opendistro-for-elasticsearch/sql-odbc"/> | ||
</vendor-information> | ||
<connection-customization class="odfe_sql_odbc" enabled="true" version="10.0"> | ||
<vendor name="Amazon"/> | ||
<driver name="ODFE SQL ODBC Driver"/> | ||
<customizations> | ||
<customization name="CAP_CREATE_TEMP_TABLES" value="no"/> | ||
<customization name="CAP_SUPPRESS_DISCOVERY_QUERIES" value="yes" /> | ||
<customization name="CAP_SELECT_INTO" value="no"/> | ||
<customization name="CAP_SELECT_TOP_INTO" value="no"/> | ||
<customization name="CAP_QUERY_BOOLEXPR_TO_INTEXPR" value="no"/> | ||
<customization name="CAP_QUERY_GROUP_BY_BOOL" value="yes"/> | ||
<customization name="CAP_QUERY_GROUP_BY_DEGREE" value="yes"/> | ||
<customization name="CAP_QUERY_SORT_BY" value="yes"/> | ||
<customization name="CAP_QUERY_SUBQUERIES" value="yes"/> | ||
<customization name="CAP_QUERY_TOP_N" value="yes"/> | ||
<customization name="CAP_QUERY_TOP_SAMPLE" value="yes"/> | ||
<customization name="CAP_QUERY_TOP_SAMPLE_PERCENT" value="yes"/> | ||
<customization name="CAP_QUERY_WHERE_FALSE_METADATA" value="yes"/> | ||
<customization name="CAP_QUERY_SUBQUERIES_WITH_TOP" value="yes"/> | ||
<customization name="CAP_SUPPORTS_SPLIT_FROM_LEFT" value="yes"/> | ||
<customization name="CAP_SUPPORTS_SPLIT_FROM_RIGHT" value="yes"/> | ||
<customization name="CAP_QUERY_ALLOW_PARTIAL_AGGREGATION" value="no"/> | ||
<customization name="CAP_QUERY_TIME_REQUIRES_CAST" value="yes"/> | ||
<customization name="CAP_ODBC_METADATA_FORCE_NUM_PREC_RADIX_10" value="yes"/> | ||
<customization name="CAP_ODBC_METADATA_FORCE_LENGTH_AS_PRECISION" value="yes"/> | ||
<customization name="CAP_ODBC_SUPPRESS_INFO_SCHEMA_TABLES" value="yes"/> | ||
<customization name="CAP_ODBC_SUPPRESS_PG_TEMP_SCHEMA_TABLES" value="yes"/> | ||
<customization name="CAP_ODBC_METADATA_SUPPRESS_SQLSTATISTICS_API" value="yes"/> | ||
</customizations> | ||
</connection-customization> | ||
<connection-dialog file='connection-dialog.tcd'/> | ||
<connection-resolver file="connectionResolver.tdr"/> | ||
<dialect file='dialect.tdd'/> | ||
</connector-plugin> |
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