Update Tableau connector to use connection dialog v2 (#88462)

This commit is contained in:
Luigi Dell'Aquila 2022-07-26 10:54:59 +02:00 committed by GitHub
parent 72a6fdc2b8
commit aaf7aa5a03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 58 additions and 20 deletions

View file

@ -0,0 +1,5 @@
pr: 88462
summary: Update Tableau connector to use connection dialog v2
area: SQL
type: enhancement
issues: []

View file

@ -1,11 +0,0 @@
<connection-dialog class='elasticsearch-jdbc'>
<connection-config>
<authentication-mode value='Basic' />
<authentication-options>
<option name="UsernameAndPassword" default="true" />
</authentication-options>
<port-prompt value="Port: " default="9200" />
<show-ssl-checkbox value="true" />
<warehouse-prompt value="Additional settings" optional="true" />
</connection-config>
</connection-dialog>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
~ or more contributor license agreements. Licensed under the Elastic License
~ 2.0; you may not use this file except in compliance with the Elastic License
~ 2.0.
-->
<connection-fields>
<field name="server" label="Server" category="endpoint" value-type="string" />
<field name="port" label="Port" category="endpoint" value-type="string" default-value="9200"/>
<field name="authentication" label="Authentication" category="authentication" value-type="string" editable="false" default-value="auth-user-pass" />
<field name="username" label="Username" category="authentication" value-type="string" />
<field name="password" label="Password" category="authentication" value-type="string" secure="true" />
<field name="sslmode" label="Require SSL" value-type="boolean" category="general" default-value="" >
<boolean-options>
<false-value value="" />
<true-value value="require" />
</boolean-options>
</field>
<field name="vendor1" value-type="string" category="general" label="Additional settings" optional="true"/>
</connection-fields>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
~ or more contributor license agreements. Licensed under the Elastic License
~ 2.0; you may not use this file except in compliance with the Elastic License
~ 2.0.
-->
<connection-metadata>
<database enabled='true' label='Database' />
<schema enabled='false' label="Schema" />
<table enabled='true' label="Table" />
</connection-metadata>

View file

@ -4,7 +4,7 @@
props["user"] = attr["username"];
props["password"] = attr["password"];
var extraProps = attr[connectionHelper.attributeWarehouse];
var extraProps = attr[connectionHelper.attributeVendor1];
if (extraProps != null && extraProps.trim().length > 0) {
// allow `&` and white-space as attribue-value pair delimiters
var avps = extraProps.trim().split(/[\s&]/);

View file

@ -7,14 +7,13 @@
<connection-normalizer>
<required-attributes>
<attribute-list>
<attr>class</attr>
<attr>server</attr>
<attr>port</attr>
<attr>authentication</attr>
<attr>username</attr>
<attr>password</attr>
<attr>dbname</attr>
<attr>sslmode</attr>
<attr>warehouse</attr>
<attr>vendor1</attr>
</attribute-list>
</required-attributes>
</connection-normalizer>

View file

@ -32,7 +32,8 @@
<customization name="CAP_SUPPORTS_SPLIT_FROM_RIGHT" value="no"/>
</customizations>
</connection-customization>
<connection-dialog file='connection-dialog.tcd'/>
<connection-fields file='connectionFields.xml'/>
<connection-metadata file='connectionMetadata.xml'/>
<connection-resolver file="connectionResolver.tdr"/>
<dialect file='dialect.tdd'/>
</connector-plugin>

View file

@ -12,7 +12,7 @@ set -e
TSA_URL=http://timestamp.digicert.com
TAB_SDK_REPO=https://github.com/tableau/connector-plugin-sdk
TAB_SDK_TAG="tdvt-2.1.9"
TAB_SDK_TAG="tdvt-2.6.1"
MY_NAME="Packager for Elastic's Tableau connector to Elasticsearch"
MY_FILE=$(basename $0)

View file

@ -1,13 +1,13 @@
diff --git a/connector-packager/setup.py b/connector-packager/setup.py
index 1601492..eb1cc27 100644
index e84c8a0..ceab20f 100644
--- a/connector-packager/setup.py
+++ b/connector-packager/setup.py
@@ -16,7 +16,7 @@ setup(
description='A Python module for packaging a Tableau connector.',
test_suite='tests',
python_requires='>3.7',
- install_requires=['xmlschema', 'defusedxml'],
+ install_requires=['elementpath==2.4.0', 'xmlschema==1.9.2', 'defusedxml==0.7.1'],
- install_requires=['xmlschema', 'defusedxml', 'packaging'],
+ install_requires=['elementpath==3.0.0', 'xmlschema==2.0.1', 'defusedxml==0.7.1', 'packaging==21.3'],
tests_require=['six'],
include_package_data=True
)