diff --git a/.github/workflows/bi-connectors.yml b/.github/workflows/bi-connectors.yml deleted file mode 100644 index e23489e17a..0000000000 --- a/.github/workflows/bi-connectors.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build connectors for BI tools - -on: - push: - paths: - - 'bi-connectors/PowerBIConnector/**' - - 'bi-connectors/TableauConnector/**' - - '.github/workflows/bi-connectors.yml' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Pack Tableau JDBC connector - id: pack-tableau-jdbc - run: | - zip -r opensearch_sql_jdbc.taco . -x *.taco - working-directory: bi-connectors/TableauConnector/opensearch_sql_jdbc - - name: Prepare Power BI ODBC connector - run: | - cp OpenSearch.pq OpenSearch.m - working-directory: bi-connectors/PowerBIConnector - - name: Pack Power BI ODBC connector - id: pack-powerbi-odbc-os-proj - run: | - zip OpenSearchProject.mez *.png *.m *.resx *.pqm - working-directory: bi-connectors/PowerBIConnector - - name: Prepare Power BI ODBC connector for 'Amazon OpenSearch Service' - id: prep-powerbi-odbc-amz-os-svc - run: | - sed -i 's/OpenSearch Project<\/value>/Amazon OpenSearch Service<\/value>/g' resources.resx - sed -i 's/Documentation.Name = "OpenSearch Project"/Documentation.Name = "Amazon OpenSearch Service"/g' OpenSearch.m - sed -i 's/OpenSearch\([^1-9]\)/AmazonOpenSearchConnector\1/g' OpenSearch.m - working-directory: bi-connectors/PowerBIConnector - - name: Pack Power BI ODBC connector for 'Amazon OpenSearch Service' - id: pack-powerbi-odbc-amz-os-svc - run: | - zip AmazonOpenSearchService.mez *.png *.m *.resx *.pqm - working-directory: bi-connectors/PowerBIConnector - - name: Upload Tableau JDBC connector - if: steps.pack-tableau-jdbc.outcome == 'success' - uses: actions/upload-artifact@v2 - with: - name: TableauConnectors - path: bi-connectors/TableauConnector/opensearch_sql_jdbc/opensearch_sql_jdbc.taco - - name: Upload Power BI ODBC connectors - if: steps.pack-powerbi-odbc-os-proj.outcome == 'success' || (steps.prep-powerbi-odbc-amz-os-svc.outcome == 'success' && steps.pack-powerbi-odbc-amz-os-svc.outcome == 'success') - uses: actions/upload-artifact@v2 - with: - name: PBIConnectors - path: 'bi-connectors/PowerBIConnector/*.mez' diff --git a/bi-connectors/PowerBIConnector/OpenSearch.pq b/bi-connectors/PowerBIConnector/OpenSearch.pq index 339cb401db..be8fa0ec44 100644 --- a/bi-connectors/PowerBIConnector/OpenSearch.pq +++ b/bi-connectors/PowerBIConnector/OpenSearch.pq @@ -30,7 +30,7 @@ OpenSearchType = type function ( ]) ) as table meta [ - Documentation.Name = "OpenSearch Project" + Documentation.Name = "OpenSearch" ]; OpenSearchImpl = (Server as text, Port as number, UseSSL as logical) as table => @@ -189,7 +189,7 @@ OpenSearch = [ in { "OpenSearch.Contents", Server, Port, UseSSL }, - // Authentication modes. + // Authentication modes Authentication = [ Implicit = [ Label = "NONE" @@ -203,7 +203,7 @@ OpenSearch = [ ] ], - // PBIDS Handler. + // PBIDS Handler DSRHandlers = [ #"opensearch-sql" = [ GetDSR = (server, schema, object, optional options) => [ protocol = "opensearch-sql", address = [ server = server, port = schema, useSSL = object ] ], @@ -216,7 +216,7 @@ OpenSearch = [ ] ], - // Enable Encryption. + // Enable Encryption SupportsEncryption = true, Label = Extension.LoadString("DataSourceLabel") @@ -241,7 +241,7 @@ OpenSearch.Icons = [ Icon32 = { Extension.Contents("OpenSearch32.png"), Extension.Contents("OpenSearch40.png"), Extension.Contents("OpenSearch48.png"), Extension.Contents("OpenSearch64.png") } ]; -// Load common library functions. +// Load common library functions Extension.LoadFunction = (name as text) => let binary = Extension.Contents(name), @@ -249,7 +249,7 @@ Extension.LoadFunction = (name as text) => in Expression.Evaluate(asText, #shared); -// Diagnostics module contains multiple functions. +// Diagnostics module contains multiple functions. . Diagnostics = Extension.LoadFunction("Diagnostics.pqm"); Diagnostics.LogValue = if (EnableTraceOutput) then Diagnostics[LogValue] else (prefix, value) => value; diff --git a/bi-connectors/PowerBIConnector/resources.resx b/bi-connectors/PowerBIConnector/resources.resx index 3db608e458..3642a474fe 100644 --- a/bi-connectors/PowerBIConnector/resources.resx +++ b/bi-connectors/PowerBIConnector/resources.resx @@ -121,9 +121,9 @@ Connect to OpenSearch - OpenSearch Project + OpenSearch - OpenSearch Project + OpenSearch \ No newline at end of file diff --git a/bi-connectors/TableauConnector/opensearch_sql_odbc/README.md b/bi-connectors/TableauConnector/opensearch_sql_odbc/README.md new file mode 100644 index 0000000000..c136140744 --- /dev/null +++ b/bi-connectors/TableauConnector/opensearch_sql_odbc/README.md @@ -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) \ No newline at end of file diff --git a/bi-connectors/TableauConnector/opensearch_sql_odbc/connection-dialog.tcd b/bi-connectors/TableauConnector/opensearch_sql_odbc/connection-dialog.tcd new file mode 100644 index 0000000000..f7ae8da245 --- /dev/null +++ b/bi-connectors/TableauConnector/opensearch_sql_odbc/connection-dialog.tcd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/bi-connectors/TableauConnector/opensearch_sql_odbc/connectionBuilder.js b/bi-connectors/TableauConnector/opensearch_sql_odbc/connectionBuilder.js new file mode 100644 index 0000000000..b5a04d1777 --- /dev/null +++ b/bi-connectors/TableauConnector/opensearch_sql_odbc/connectionBuilder.js @@ -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; +}) diff --git a/bi-connectors/TableauConnector/opensearch_sql_odbc/connectionResolver.tdr b/bi-connectors/TableauConnector/opensearch_sql_odbc/connectionResolver.tdr new file mode 100644 index 0000000000..68c376270c --- /dev/null +++ b/bi-connectors/TableauConnector/opensearch_sql_odbc/connectionResolver.tdr @@ -0,0 +1,27 @@ + + + + +