> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kamu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Tableau

> Connecting Tableau via JDBC protocol.

export const Diagram = ({src, alt}) => {
  return <div style={{
    display: "flex",
    "flex-direction": "column",
    "align-items": "center"
  }}>
    <img src={src} alt={alt} style={{
    background: "#dddddd",
    "margin-bottom": 0
  }} />
    <span>{alt}</span>
  </div>;
};

export const YouTubeList = ({id}) => {
  const src = `https://www.youtube.com/embed/videoseries?list=${id}`;
  return <iframe className="w-full aspect-video rounded-xl" src={src} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>;
};

export const YouTube = ({id, width}) => {
  const src = `https://www.youtube.com/embed/${id}`;
  return <iframe className="w-full aspect-video rounded-xl" src={src} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen width={width}></iframe>;
};

export const Schema = ({t, id}) => {
  const anchor = id ? id : t.toLowerCase().replace(/\s+/g, "-");
  const link = `/odf/schemas#${anchor}`;
  return <a class="schema-object" href={link}>{t}</a>;
};

export const Term = ({t, id}) => {
  const anchor = id ? id : t.toLowerCase().replace(/\s+/g, "-");
  const link = `/general/glossary#${anchor}`;
  return <a class="glossary-term" href={link}>{t}</a>;
};

[Tableau](https://www.tableau.com/) is a professional business intelligence tool. It can be connected to `kamu` using a JDBC driver.

In this setup:

* `kamu` runs an [Arrow Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html) server - a high-performance protocol for data transfer
* `Tableau` loads a special JDBC driver - a Java software module that implements an abstract database interface
* JDBC driver translates `Tableau`'s commands into efficient Flight SQL calls in `kamu`

To connect `Tableau` to `kamu` follow these simple steps:

1. Downlaod the latest [Flight SQL JDBC Driver](https://central.sonatype.com/artifact/org.apache.arrow/flight-sql-jdbc-driver)
2. Install the driver into `Tableau` (see [official instructions](https://help.tableau.com/current/pro/desktop/en-us/examples_otherdatabases_jdbc.htm)) by copying the `.jar` file to:
   * Windows: `C:\Program Files\Tableau\Drivers`
   * Mac: `~/Library/Tableau/Drivers`
   * Linux: `/opt/tableau/tableau_driver/jdbc`
3. Run `kamu` Flight SQL server in a desired workspace:
   ```bash theme={null}
   kamu sql server --flight-sql --address 127.0.0.1 --port 50050
   ```
4. Create a new connection in `Tableau` using `Other Databases (JDBC)` as a source:
   * Select `PostgreSQL` in the dialect selector
   * As URL specify:
     ```bash theme={null}
     jdbc:arrow-flight-sql://127.0.0.1:50050?useEncryption=false
     ```
   * Use `"kamu"` as username and password
