Skip to content

Commit aab162a

Browse files
Georg Traaramotl
authored andcommitted
Tableau: Starter tutorial
1 parent 427d701 commit aab162a

File tree

2 files changed

+79
-2
lines changed

2 files changed

+79
-2
lines changed

docs/integrate/tableau/index.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ In this tutorial, you will:
3434
:::
3535

3636
:::{grid-item-card} Article: Using CrateDB with Tableau
37-
:link: https://community.cratedb.com/t/using-cratedb-with-tableau/1192
38-
:link-type: url
37+
:link: tableau-tutorial
38+
:link-type: ref
3939
How to install the latest PostgreSQL JDBC driver (e.g.
4040
`postgresql-42.7.1.jar` or newer) for using Tableau.
4141
:::
@@ -62,6 +62,13 @@ We are tracking interoperability issues per [Tool: Tableau] and
6262
[CrateDB and Tableau]
6363
```
6464

65+
:::{toctree}
66+
:maxdepth: 1
67+
:hidden:
68+
Tutorial <tutorial>
69+
:::
70+
71+
6572
[Connector: Issues]: https://github.com/crate/cratedb-tableau-connector/issues
6673
[CrateDB and Tableau]: https://cratedb.com/integrations/cratedb-and-tableau
6774
[Tableau]: https://www.tableau.com/

docs/integrate/tableau/tutorial.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
(tableau-tutorial)=
2+
# Using CrateDB with Tableau
3+
4+
For using Tableau with CrateDB, install the latest PostgreSQL driver, as detailed in the steps below.
5+
6+
1. Download the Java 8 JDBC driver (e.g. `postgresql-42.7.1.jar` or newer) from https://jdbc.postgresql.org/download/.
7+
2. Move the downloaded `.jar`-file (e.g. `postgresql-42.7.1.jar`) into the Tableau Driver folder.
8+
> * **Windows**: `C:\Program Files\Tableau\Drivers`
9+
> * **Mac**: `~/Library/Tableau/Drivers`
10+
> * **Linux**: `/opt/tableau/tableau_driver/jdbc`
11+
3. Open Tableau.
12+
4. Create a `PostgreSQL` connection.
13+
14+
![image|454x500, 75%](https://us1.discourse-cdn.com/flex020/uploads/crate/original/2X/c/cf27bb4288737b66d2af620092f529f481dbe328.jpeg){height=500px}
15+
5. Start using Tableau with CrateDB.
16+
17+
## Using Tableau with CrateDB 5.1 and earlier
18+
::::{dropdown} **Details**
19+
20+
As of CrateDB 5.0.0 there are still some features missing to directly
21+
use the default PostgreSQL Connector in CrateDB (e.g. `DECLARE CURSOR` support).
22+
Therefore, it is best to use a `Other Databases (JDBC)` connection with the
23+
latest PostgreSQL JDBC Driver. To improve the user experience Tableau allows
24+
to customize connections using `.tdc` (Tableau Datasource Customization) files.
25+
26+
If we see significant demand, we might look into creating a custom Tableau Connector,
27+
however we also expect CrateDB to be fully compatible with the default PostgreSQL
28+
Connector soon.
29+
30+
## Customize CrateDB Connection
31+
32+
1. Download the [latest PostgreSQL JDBC Driver](https://jdbc.postgresql.org/download/)
33+
2. Move the downloaded `.jar`-file (e.g. `postgresql-42.4.1.jar`) into the Tableau Driver folder
34+
> * **Windows**: `C:\Program Files\Tableau\Drivers`
35+
> * **Mac**: `~/Library/Tableau/Drivers`
36+
> * **Linux**: `/opt/tableau/tableau_driver/jdbc`
37+
>
38+
> *also see https://help.tableau.com/current/pro/desktop/en-us/examples_otherdatabases_jdbc.htm*
39+
3. Create an empty [.tdc](https://help.tableau.com/current/pro/desktop/en-us/connect_customize.htm) (Tableau Datasource Customization) file e.g. `crate-jdbc.tdc`
40+
4. Copy the following content into the file:
41+
```xml
42+
<connection-customization class='genericjdbc' enabled='true' version='10.0'>
43+
<vendor name='genericjdbc' />
44+
<driver name='postgresql' />
45+
<customizations>
46+
<customization name='CAP_CONNECT_STORED_PROCEDURE' value='no'/>
47+
<customization name='CAP_CREATE_TEMP_TABLES' value='no'/>
48+
<customization name='CAP_FAST_METADATA' value='yes'/>
49+
<customization name="CAP_FORCE_COUNT_FOR_NUMBEROFRECORDS" value="yes"/>
50+
<customization name='CAP_JDBC_QUERY_ASYNC' value='yes'/>
51+
<customization name='CAP_JDBC_QUERY_CANCEL' value='yes'/>
52+
<customization name='CAP_QUERY_HAVING_REQUIRES_GROUP_BY' value='no'/>
53+
<customization name="CAP_QUERY_SUBQUERIES_WITH_TOP" value="yes"/>
54+
<customization name="CAP_QUERY_TOP_N" value="yes"/>
55+
<customization name='CAP_QUERY_TOPSTYLE_LIMIT' value='yes'/>
56+
<customization name='CAP_SELECT_INTO' value='no'/>
57+
<customization name='CAP_SUPPRESS_TEMP_TABLE_CHECKS' value='yes'/>
58+
</customizations>
59+
</connection-customization>
60+
```
61+
5. Save the `.tdc-file` in your `Datasources` folder (e.g. `/Users/<username>/Documents/My Tableau Repository/Datasources/crate-jdbc.tdc`
62+
6. Open Tableau
63+
7. Create an `Other Databases (JDBC)` connection
64+
> **URL**: jdbc:postgresql://localhost:5432/doc
65+
> **Dialect**: PostgreSQL
66+
> **Username**: crate
67+
> **Password**:
68+
8. Start using Tableau with CrateDB :)
69+
70+
::::

0 commit comments

Comments
 (0)