Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Connecting JavaScript and Exasol with ADBC

Instructions

Tip

If you already have an Exasol instance running, skip the steps to run Exasol in a Docker container.

Prerequisites

  1. Install Node.js (version 22 or later)

    • Alternatively, you can use Bun or Deno
  2. Install dbc

Set up Exasol

  1. Install Docker

Warning

The Exasol Docker image may not work with Docker for Windows or Docker for macOS. On macOS, we have found that Colima's x86_64 emulation may work better. Alternatively, consider Exasol Personal running in the cloud.

  1. Start Exasol in a Docker container (documentation):

    docker run \
       -p 127.0.0.1:9563:8563 \
       --name exasol \
       --privileged \
       --detach \
       exasol/docker-db:latest-2025.1
  2. Create a table in Exasol and load data into it:

    docker cp games.sql exasol:/tmp/games.sql
    docker cp load-data.sh exasol:/tmp/load-data.sh
    docker exec exasol bash /tmp/load-data.sh

Connect to Exasol

  1. Install the Exasol ADBC driver:

    dbc install exasol
  2. Install dependencies:

    npm --prefix .. install
  3. Customize the script main.js as needed

    • Change the connection arguments in databaseOptions
      • Change uri as needed, using query parameters to add more connection arguments, or keep it as is to use the data included with this example
    • If you changed which schema you're opening, also change the SQL SELECT statement in conn.query()
  4. Run the script:

    Node.js:

    node main.js

    Bun:

    bun run main.js

    Deno:

    deno run --allow-ffi --allow-env main.js

Clean up

  1. Stop the Docker container running Exasol:

    docker stop exasol
    docker rm exasol