Updated on 2025-08-25 GMT+08:00

Important Notes

The DataArts Fabric SQL Java SDK encapsulates the Java language version of REST APIs provided by DataArts Fabric SQL. You can use the interface methods provided by the SDK to access DataArts Fabric SQL, thereby simplifying the development process during usage.

This section introduces the version changes of the Java SDK and provides instructions for SDK installation.

Change Description

Table 1 shows the version changes of this SDK along with explanations for certain functional modifications.

Table 1 Java SDK version changes

Version

Change Type

Change Description

2.0.0-r3

SDK initial release

None

Precautions:

  • Ensure that you have subscribed to and possess the permissions to use DataArts Fabric SQL, including LakeFormation and OBS.
  • Ensure your understanding of basic concepts within DataArts Fabric SQL, such as workspace, endpoint, access key (AK and SK), and session.

Java SDK Method Overview

Table 2 summarizes the interface methods supported by the DataArts Fabric SQL Java SDK along with their descriptions. For detailed descriptions and sample codes of each interface method, click the method name in the table to navigate to the respective details page.

Table 2 Java SDK methods

Method Name

Method

Function

Create Session

createSession

Creates a session and returns the session ID.

Close Session

closeSession

Closes a specified session and releases relevant resources.

Execute SQL Statements Synchronously

syncQuery

Executes SQL queries and waits for the results synchronously. A complete dataset is returned.

Execute SQL Statements Asynchronously

asyncQuery

Submits a SQL query and immediately returns a task ID. Results are obtained asynchronously.

Cancel Query

cancelExecute

Cancels an ongoing asynchronous query task.

Obtain Query Results (Through OBS)

getStatementResult

Obtains the result of an asynchronous query. The result set is read from OBS.

Obtain Query Results (Directly)

getStatementResultDirect

Obtains the result of an asynchronous query, which is directly returned from the server.

Compatibility

Recommended JDK versions: JDK 1.8 or later.