Skip to content

Support IMPORT/EXPORT of local files via WebSocket protocol #47

@mikhail-zhadanov

Description

@mikhail-zhadanov

Problem

The Exasol WebSocket protocol supports local file IMPORT/EXPORT operations (the server sends data to/from the client over the WebSocket), but the TypeScript driver does not implement this. When a user executes an IMPORT FROM LOCAL CSV FILE statement, the server returns:

Feature not supported: IMPORT and EXPORT of local files is only supported via JDBC (except prepared statements) or EXAplus

This is a server-side error because the driver doesn't handle the file transfer handshake that the WebSocket API defines for local file operations.

WebSocket API Reference

The Exasol WebSocket API documents local file transfer in the executePreparedStatement and execute commands. When a query involves LOCAL files, the server enters a data transfer mode where:

  1. The server sends a response indicating it needs file data
  2. The client reads the local file and sends chunks over the WebSocket
  3. The server acknowledges completion

For EXPORT to local files, the flow is reversed — the server sends data chunks that the client writes to a local file.

Reference: https://github.com/exasol/websocket-api/blob/master/docs/commands/executeV1.md

Impact

This is a significant limitation for VS Code extension users and any Node.js-based tooling. Users cannot:

  • IMPORT INTO table FROM LOCAL CSV FILE '/path/to/file.csv'
  • EXPORT table INTO LOCAL CSV FILE '/path/to/output.csv'

They must stage files in cloud storage (S3, Azure, GCS) as a workaround, which is cumbersome for local development and small datasets.

Context

Reported by users of the Exasol VS Code extension. The JDBC driver and EXAplus both support this feature. Adding it to the TypeScript driver would bring it to parity for this important use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureProduct feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions