From ff72352fe9cb2ed88ef5de6e9c9f1bbc55d82c16 Mon Sep 17 00:00:00 2001 From: Luke Petschauer Date: Thu, 12 Sep 2024 11:43:37 -0700 Subject: [PATCH 1/2] Update tdvt.md --- docs/tdvt.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/tdvt.md b/docs/tdvt.md index 055367a5..5feb2d58 100644 --- a/docs/tdvt.md +++ b/docs/tdvt.md @@ -76,12 +76,13 @@ You can create an archive package and install that, or install from the live dir $ source tdvt-venv/bin/activate ``` - or on Windows: + or on Windows: ``` D:\src> python -m venv ./tdvt-venv D:\src> tdvt-venv/Scripts/activate.bat ``` + You will know your venv is activated if (tdvt-venv) appears before your prompt. Alternatively, do a $which python to make sure it's pointing to a python executable in /tdvt-venv Install TDVT: @@ -89,10 +90,21 @@ You can create an archive package and install that, or install from the live dir $ (tdvt-venv) cd connector-plugin-sdk/tdvt $ (tdvt-venv) pip install -e . ``` - The . at the end is important. + + The . at the end is important. Verify it is installed: - ```pip list```` + + ``` + $ (tdvt-venv) pip list + Package Version Location + ---------- ------- ------------------------------------------------- + defusedxml 0.7.1 + pip 21.2.4 + setuptools 58.0.4 + tdvt 2.13.7 /your/working/dir/connector-plugin-sdk/tdvt + ```` + Note that TDVT's `Location` is where you cloned the package. 1. Extract and then load the [TestV1 dataset](https://github.com/tableau/connector-plugin-sdk/tree/master/tests/datasets/TestV1) into your database. __Notes:__ @@ -267,8 +279,7 @@ To create custom tests, you need to create a json file that describes your table **`nulls` and `empties`**: Enter `true` or `false` for each of the following: Data Shape | Description | Calcs Reference Column --|-|- - +- | - | - `nulls` | Fields in the column may contain a null value. | [int1](https://github.com/tableau/connector-plugin-sdk/blob/master/tests/datasets/TestV1/Calcs_headers.csv) `empties` | Fields in the column may contain no data (e.g. an empty string). | [datetime1](https://github.com/tableau/connector-plugin-sdk/blob/master/tests/datasets/TestV1/Calcs_headers.csv) From b4baded24d8fcd8275c43fb6c2ba46bca7feaf6c Mon Sep 17 00:00:00 2001 From: Luke Petschauer Date: Thu, 12 Sep 2024 11:49:01 -0700 Subject: [PATCH 2/2] hopefully fix more formatting --- docs/tdvt.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/tdvt.md b/docs/tdvt.md index 5feb2d58..3d6a5dd7 100644 --- a/docs/tdvt.md +++ b/docs/tdvt.md @@ -86,26 +86,26 @@ You can create an archive package and install that, or install from the live dir You will know your venv is activated if (tdvt-venv) appears before your prompt. Alternatively, do a $which python to make sure it's pointing to a python executable in /tdvt-venv Install TDVT: + ``` $ (tdvt-venv) cd connector-plugin-sdk/tdvt $ (tdvt-venv) pip install -e . ``` - The . at the end is important. + The `.` at the end is important. - Verify it is installed: + You can then verify TDVT is installed: ``` $ (tdvt-venv) pip list Package Version Location - ---------- ------- ------------------------------------------------- - defusedxml 0.7.1 - pip 21.2.4 - setuptools 58.0.4 - tdvt 2.13.7 /your/working/dir/connector-plugin-sdk/tdvt - ```` - Note that TDVT's `Location` is where you cloned the package. - + ---------- ------- ------------------------------------------------- + defusedxml 0.7.1 + pip 21.2.4 + setuptools 58.0.4 + tdvt 2.13.7 /your/working/dir/connector-plugin-sdk/tdvt + ``` + Note that TDVT's `Location` is where you cloned the package. 1. Extract and then load the [TestV1 dataset](https://github.com/tableau/connector-plugin-sdk/tree/master/tests/datasets/TestV1) into your database. __Notes:__ - See [Postgres Example](https://github.com/tableau/connector-plugin-sdk/tree/master/tests/datasets/TestV1/postgres/README.md) for an example of loading data into a database @@ -136,14 +136,14 @@ __Note:__ For setting up TDVT using Tableau Linux Server please click [here](/co ## About running TDVT -- When TDVT is installed as a Python module, invoke it as follows: -`python -m tdvt.tdvt` +- When TDVT is installed as a Python module, call it as a module: +`$ python -m tdvt.tdvt` - Make sure you're using the correctly using Python 3 if you have multiple versions of python installed. - TDVT makes searches relative to the current working directory to find the config and setup files it needs. - Always run TDVT commands from the top-level directory of your generated folder structure. - Use double quotes to wrap arguments that contain spaces. -`tdvt run mydb --generate` is used to update some config files. +`python -m tdvt.tdvt run mydb --generate` is used to update some config files. You need to run it if you add a new data source or change your mydb.ini file. ## Test a new data source