If you have built connectors using WDC version 1.x you can continue to use those connectors in Tableau, up through Tableau 2019.1. See WDC Versions for information about compatibility. However, you cannot turn a version 1.x connector into a version 2.x connector by just linking to version 2.x of the Tableau WDC library. The connector will not work unless you also update the connector to use code changes introduced in version 2.x of the API.
In this section
You should considering upgrading your connectors to version 2.x to have access to all the great new features that have been introduced for WDC in Tableau 10.0 and later. You might want to keep your version 1.x connectors if you need to support earlier versions of Tableau.
In version 2.x you can:
getTableDatafunction so that you could pass data to Tableau through a callback parameter.
tableau.dataTypeenum, you can send GeoJSON objects directly back to Tableau.
To support the new features, changes have been made to the API. For example, to support multiple tables, there is now a
getSchema() function that has a callback function for reporting the tables contained in the WDC. The
getTableData() function was changed to
getData() and it now takes a table object as a parameter. Review the following list and the samples to better understand the changes.
In version 1.x:
connector.getColumnHeaders(), which defines the schema for a single table. The
getColumnHeaders()function finishes by calling a predefined callback.
connector.getTableData(), which passes data to Tableau by means of a parameter on the predefined
tableau.dataCallback()passes a flag to Tableau to signal that there is no more data.
In version 2.x:
connector.getSchema(), which defines the schema for one or more tables. The connector calls a predefined callback to signal that it is done defining the table schema.
connector.getData()with a table object parameter and a callback parameter. The
getData()function appends data to the table object using the object’s built-in
getData()function is called once for each table defined in the schema.
getData()function is done gathering data, it calls the
doneCallback()that it was passed as a parameter.
In WDC version 2.x, the column and table identifiers (
tableId) can only contain alphanumeric (a-z, A-Z, 0-9) and underscore characters (
_). The identifiers must match the regular expression:
^[a-zA-Z0-9_]*$. The identifiers cannot contain spaces, hyphens, or special characters. In WDC version 1.x, the string values containing spaces were allowed to pass through.
As always, it is good practice to test your connector in the WDC version 2.x simulator to make sure you are getting the data that you expect. See Debugging in the Simulator and Tableau.