Installation
Hyper API is available for Python, C++ and Java supporting Windows, Mac and Linux each. Depending on the language, the installation can be complex. This page contains the detailed requirements and installation instructions for all languages.
License
The Hyper API packages are released under the Apache 2.0 License. The exact license text can be found inside the packages, after unzipping. The documentation is licensed under the MIT License. The source code of the documentation can be found on GitHub.
Hardware requirements
The Hyper API only supports 64-bit platforms. It has the following minimum hardware requirements:
- Intel Nehalem, Apple Silicon or AMD Bulldozer processor or newer
- 2 GB memory
- 1.5 GB minimum free disk space
Supported platforms
- macOS 10.13 or newer (for Intel)
- macOS 13.0 or newer (for Apple Silicon)
- Microsoft Windows 8 or newer (64-bit)
- Microsoft Windows Server 2016, 2012, 2012 R2, 2008 R2, 2019, 2022
- Ubuntu 18.04 LTS and newer
- Amazon Linux 2023, Red Hat Enterprise Linux (RHEL) 8.3+ and 9.x+, Oracle Linux 8.3+ and 9.x+, CentOS Stream 8.3+ and 9.x
Language-specific Requirements
- Python
- C++
- Java
- Python 3.8 (or newer) is required.
- Install the 64-bit version (for example, for Windows, the download is listed as
Windows x86-64). - On Windows, we recommend to select the option Add Python 3.x to PATH during installation.
- Install the 64-bit version (for example, for Windows, the download is listed as
- The C++ headers use C++11, so a standard-compliant compiler with thorough C++11 support is required. Our internal testing is done with the newest Clang.
Using at least C++17 is recommended, as the API uses C++17 classes, such as std::optional and std::string_view. If the headers are compiled with a standard older than C++17, interface-compatible classes of the API will be used instead.
- For the examples, a CMake project file is provided. To build it, CMake must be installed on your computer and available in your PATH.
- On Windows, you also need Visual Studio 2015 (or newer).
- JDK 8 (or newer) is required.
Instructions
- Python
- C++
- Java
The following instructions assume that you have set up a virtual environment for Python. For more information on creating virtual environments, see venv - Creation of virtual environments in the Python Standard Library.
Open a terminal and navigate to the
venvdirectory.Install the tableauhyperapi module using pip.
pip install tableauhyperapiIf you previously installed the
tableauhyperapi, you can upgrade to the latest version using the following command.pip install --upgrade tableauhyperapidangerLinux installations require
pipversion 19.3 or newer. Note thatpipversions 20.0 and 20.1 are not working because of issues withpip.Alternatively, you can download the Python Hyper API wheel package (
.whlfile) for your operating system. Usepipto install the.whlfile you downloaded.- On Windows:
Scripts\pip install [*path_to_whl_file*] - On Linux/macOS:
bin/pip install [*path_to_whl_file*]
- On Windows:
Try out the examples:
- Download the samples from Github.
- Run the Python examples (for example, try
insert_data_into_single_table.py).- On Windows:
[venv_directory]\Scripts\python hyper-api-samples\Tableau-Supported\Python\insert_data_into_single_table.py - On Linux/macOS:
[venv_directory]/bin/python hyper-api-samples/Tableau-Supported/Python/insert_data_into_single_table.py
- On Windows:
Download the C++ Hyper API package file (
.zipfile) for your operating system.Unzip the Hyper API package file to a convenient location.
To build and run the examples on the command line:
- Open a terminal. On Windows, open the VS2019 x64 Native Tools Command Prompt.
- Navigate into the
examplesdirectory of the extracted C++ Hyper API package. - Configure the project with
cmake:- On Windows:
cmake -G "Visual Studio 16 2019 Win64" . - On Linux/macOS:
cmake .
- On Windows:
- Build the examples:
- On Windows:
cmake --build . --config Debugorcmake --build . --config Release - On Linux/macOS:
cmake --build .
- On Windows:
- Run the examples
- On Windows:
ctest --verbose -C Debugorctest --verbose -C Release - On Linux/macOS:
ctest --verbose
- On Windows:
To build and run the examples in Visual Studio, go to File > Open > Folder and select the
examplesdirectory of thetableauhyperapi-cxxpackage.If you want to build your own applications, you need to install the Hyper API library on your computer. To do this:
- On Windows: Append the extracted bin directory to your system
PATHvariable. - On Linux: Append the extracted lib directory to your system
LD_LIBRARY_PATHvariable. - On macOS: You need to include the lib directory as
RPATHfor every binary.
- On Windows: Append the extracted bin directory to your system
Download the Java Hyper API package file (
.zipfile) for your operating system.Unzip the Hyper API package file to a convenient location.
To build and run the examples on the command line:
- Open a terminal and navigate into the
examplesdirectory of the extracted Java Hyper API package. - Build the examples:
gradle build - Run the examples:
gradle run
- Open a terminal and navigate into the
You can import the example project into IntelliJ or Eclipse:
- IntelliJ:
- Import the Hyper API into IntelliJ by opening the
build.gradlefile from the unzipped Hyper API package. - In the Gradle view, choose an example and select Tasks > application > run.
- Import the Hyper API into IntelliJ by opening the
- Eclipse:
- You need to have a recent version of Eclipse installed to use Gradle.
- Import the Hyper API into Eclipse as an existing Gradle project (File > Import > Gradle > Existing Gradle Project).
- Select the directory of the unzipped Hyper API package as the "Project root directory".
- Select Override workspace settings in the "Import Options" dialog and use at least Gradle version 5.5.
- In the Gradle Tasks view, choose an example and select application > run.
- IntelliJ:
You can create new projects that use the Hyper API in IntelliJ or Eclipse:
- Create a new Java project. Make sure the JDK is set to Java 8, that is, JavaSDK-1.8.
- Add the following libraries from the
libdirectory of the unzipped Hyper API package as external JARs:tableauhyperapi.jartableauhyperapi-windows.jar(Windows),tableauhyperapi-linux.jar(Linux),tableauhyperapi-darwin.jar(macOS)jna-5.6.0.jar - Copy the
hyperfolder from thelibdirectory of the unzipped Hyper API package next to the JARs, as in the example project. - To enable proper Javadoc, add the
hapi-javadoc.jarfrom the lib directory as the Javadoc archive.
Java Native Access Library
If your security requirements require you to run Java applications with the system property jna.nounpack set to true, which disables unpacking from a .jar file, you need to obtain the native Hyper API library in another way. While you could extract the library from the .jar file in the Java Hyper API package, the easiest way is to download and unzip the C++ Hyper API package for your platform, as described in the following steps:
- Download
hyperapi-cxxpackage for your platform. - Unzip the package and place the native Hyper API library in a directory or folder accessible by the Java application.
- For Windows, the native library (
tableauhyperapi.dll) file is in thebindirectory of the.zipfile. - For Linux, the library (
libtableauhyperapi.so) is in thelibdirectory of the.zipfile. - For macOS, the library (
libtableauhyperapi.dylib) is in thelibfolder of the.zipfile.
- For Windows, the native library (
- Set system property
jna.library.pathwith value set to the absolute path of the folder or directory that contains the native library file for your platform (from step 2).