Skip to content

Tableau TDVT Quick Setup

hab6 edited this page Dec 5, 2022 · 8 revisions

Concise steps for installing, configuring, and running the Tableau TDVT test suite on Windows 10

Reference to Tableau TDVT setup instructions: https://tableau.github.io/connector-plugin-sdk/docs/tdvt

These steps have been verified to work with:

  • ODBC connector actian_odbc.taco (Manifest-Version: 1.0)
  • JDBC connector actian_jdbc.taco (Manifest-Version: 1.0)
  • Tableau Desktop 2022.2.2
  • Actian Ingres 11.2

Assumptions:

  • The git client is installed locally on Windows.
  • Tableau Desktop is installed.

Steps

Note the distinction between the "base" directory and the "workspace" directory. The workspace directory needs to be a subdirectory of the base directory.

  1. Create a base directory and change to this directory.

  2. Create and activate a python virtual environment.

   python -m venv .venv  
   .venv\Scripts\activate.bat  

         (Optional) Update pip version: python -m pip install --upgrade pip

  1. Clone the connector-plugin-sdk.
   git clone https://github.com/tableau/connector-plugin-sdk.git
  1. Change to directory connector-plugin-sdk/tdvt

  2. Install the live TDVT package

   python -m pip install -e .
  1. Verify the tdvt package is installed.
   python -m pip show tdvt
  1. Ensure tdvt database data is loaded. See instructions (based on original tests).

  2. Return to the base directory and create a workspace directory (use any unique name). Change into the workspace directory and run remaining commands from the workspace directory.

  3. Set up TDVT workspace with empty environment.

   python -m tdvt.tdvt action --setup
  1. Set the path to tabquerytool in <workspace directory>/config/tdvt/tdvt_override.ini
    Do not use quotes in the ini file for the path to tabquerytool.exe
    e.g.
   TAB_CLI_EXE_X64 = C:\Program Files\Tableau\Tableau 2022.2\bin\tabquerytool.exe
  1. Ensure your packaged or under development connector is present in the correct location. See reference for more information.

  2. Start Tableau Desktop and follow connector_plugin-sdk instructions under section "Test a new data source".
    a. Save tds files to <workspace>/tds directory.
    b. Use data source file names: cast_calcs.<dsname>.tds, Staples.<dsname>.tds

  3. Run the TDVT generate command from workspace directory to update config files.

   python -m tdvt.tdvt run <dsname> --generate
  1. Check the logical configs list to see whether any of the existing configs match the schema and case used for your TDVT test table names. Remember this information.
   python -m tdvt.tdvt list-logical-configs
  1. Add the data source.
    a. Set password now (or optionally later).
    b. (Reference the prior step) If the schema and case of your TDVT test table names matches one of the existing logical configs, use that config name when prompted. Otherwise, skip setting the logical config for now and handle it in the next step.
   python -m tdvt.tdvt action --add_ds <dsname>
  1. Perform this step only if a logical config was not selected in the last step.
    Edit config/<dsname>.ini file and add the following logical config.
    Use any unique name in place of labelxyz and ensure the value of myschema matches your actual table schema.
   # Example
   [Datasource]
   Name = <dsname>
   LogicalQueryFormat = labelxyz

   [LogicalConfig]
   Name = labelxyz
   tablename = $dsName
   tablePrefix = [myschema].

Reminder: Tests must be generated and run from the workspace directory.

  1. Re-Generate tests
   python -m tdvt.tdvt run <dsname> --generate
  1. List tests
   python -m tdvt.tdvt list <dsname>
  1. Run smoke tests
   python -m tdvt.tdvt run <dsname> --verify 
  1. Run full test suite
   python -m tdvt.tdvt run <dsname>