Skip to content

Latest commit

 

History

History
469 lines (347 loc) · 33 KB

CHANGELOG.md

File metadata and controls

469 lines (347 loc) · 33 KB

Release History

Unreleased

  • Avoid intermediate decimal strings when materializing Arrow DECIMAL values with safe unscaled integers, on both backends.
  • Reduce Arrow row materialization overhead on both backends by reading vectors directly and resolving scalar conversions once per batch. Object and array row values are unchanged.
  • The Thrift token federation exchange (enableTokenFederation) now goes through the connection's agent, so proxy, checkServerCertificate, customCaCert and clientCert/clientKey apply to it. Previously it connected directly with Node's default agent, so behind a required proxy the exchange failed and the driver fell back to the original token. (#611)
  • Kernel backend: a failed status poll while waiting for a statement (a runAsync: true statement, or a default execution that outlives the server's inline wait) and a failed result fetch in hasMoreRows() now throw the mapped driver error, such as HiveDriverError: HTTP 500: Internal Server Error once retries on HTTP 5xx run out, instead of a raw Error whose message is the internal __databricks_error__:{...} envelope. As in fetchChunk(), a failed fetch in hasMoreRows() also closes the statement. (#608)
  • Honor cloudFetchConcurrentDownloads when opening kernel sessions, with a default window of 16 and explicit chunk-setting overrides. Values other than positive safe integers raise HiveDriverError at session open.
  • Reduce result chunking and fetchAll() overhead for large query results.
  • Thrift CloudFetch downloads are now bounded end to end by retriesTimeout (default 15 minutes), including every attempt and retry backoff. Previously a stalled download, where the response headers or body never arrived, blocked the fetch forever. A download still running when the deadline expires is aborted and fails with RetryError (TIMEOUT_EXCEEDED, message CloudFetch result download failed: Retry timeout exceeded). (#520)
  • Thrift connections made through proxy now apply checkServerCertificate, customCaCert and clientCert/clientKey. Previously the proxied path ignored them and verified against Node's process-wide trust store, so a certificate outside the configured trust set could be accepted. Compatibility: proxied connections now verify unless checkServerCertificate: false is set; as on direct connections, NODE_TLS_REJECT_UNAUTHORIZED=0 no longer turns verification off. For an https proxy these options also apply to the proxy's own certificate. (#485)
  • Honor the client useCloudFetch: false default on the kernel backend so complete results can be fetched without cloud-storage downloads. (#574)
  • Thrift HTTP errors (THTTPException) now append server detail from the error headers (at most 500 characters). Kernel-backend errors now carry a non-enumerable cause summarizing the kernel error code and message (also at most 500 characters). Reyden fallback preserves KP001 after any existing kernel cause. (#467)
  • Add Symbol.asyncDispose to clients, sessions, and operations, delegating to close(). Use asyncDisposable() with interface-typed results in TypeScript; existing interfaces and factory return types remain unchanged. (#331)
  • Thrift ExecuteStatement requests are now retried when the connection fails before the request is sent (ECONNREFUSED, ENOTFOUND, EAI_AGAIN), within the existing retryMaxAttempts / retriesTimeout budget; once retries run out, the original connection error is thrown. Failures after the request may have reached the server are still not retried, so a statement can't run twice. (#458)
  • Add the https connection option: set https: false to connect to host over plain HTTP (port 80 by default), for example through a trusted local reverse proxy. HTTPS remains the default, and plain HTTP should only be used on a trusted local or private link. (#503)
  • Add the rowMode option to executeStatement(): rowMode: 'array' returns each row as an array of values in column order, so columns with the same name (e.g. SELECT carat AS a, color AS a) are no longer lost; the default 'object' rows are unchanged, and the driver now logs a warning when a result has duplicate column names in object mode. (#118)
  • CloudFetch retry-exhaustion errors now identify the download and the last failure: the RetryError message reads CloudFetch result download failed: <original message> (last error: <cause>). <cause> is HTTP <status>: <statusText> (or HTTP <status> when the status text is empty) for HTTP failures, and network error <code>, network error (<type>) (e.g. aborted, when there is no code) or a bare network error for network failures (the raw network-error message, which can contain the presigned URL, is not copied). If no cause can be determined, the (last error: …) suffix is omitted. The RetryError instance, errorCode and payload (including the node-fetch Request / Response) are unchanged. (#471)
  • Report untyped NULL columns as STRING in kernel result metadata, matching Thrift. (#470)
  • IOperation.close() no longer throws when the close request fails after the operation has finished (for example, once its results were read, or when the execute response already reported completion): the failure is logged as a warning and reported in the returned status's info, and the operation is still closed locally. Closing an operation that hasn't finished still throws on failure. (#480)
  • Reject non-scalar query parameter values at bind time with a ParameterError on both the Thrift and kernel backends, instead of stringifying them (which could leave a Thrift operation stuck before FINISHED). Newly rejected on the Thrift backend: arrays, plain objects, boxed primitives (e.g. new String('x'), new Number(1)), functions, symbols, and a DBSQLParameter that wraps another DBSQLParameter. Primitives, Date, Int64, and DBSQLParameter are still accepted.
  • DBSQLLogger: a filepath naming an existing directory now writes to databricks-sql-nodejs.log inside it, instead of silently producing no logs. (#565)
  • DBSQLLogger: if the log file can't be opened (including when its directory can't be created, which used to throw from the constructor), the logger now logs to the console only, leaves transports.file undefined, and emits a process warning with code DBSQL_LOG_FILE_UNAVAILABLE. Previously an unwritable file could silently stall all logging, including the console. (#565)
  • Kernel backend: getPrimaryKeys() without a tableName now throws a ParameterError (Invalid argument: tableName may not be null, SQLSTATE 42000) instead of an opaque native conversion error. (#479)
  • Upgrade thrift to 0.25, which depends on the CommonJS-compatible uuid@11 instead of the ESM-only uuid@13, so require('@databricks/sql') works again in Jest and other environments without require(esm). (#461)
    • Behavior change for direct users of the exported thrift.TCLIService (DBSQLClient itself uses the callback form and is unaffected): TCLIService.Client calls made without a callback now return native Promises instead of Q promises, and TCLIService.Processor runs promise-returning handlers through native Promises. Q-only methods such as .fail(), .fin(), .done() and .spread() no longer exist; use .catch(), .finally() and .then(). An unhandled rejection is now a real Node unhandled rejection, which crashes the process under Node's default --unhandled-rejections=throw. Q only emitted the unhandledRejection event manually, so it never crashed. Handle every promise a callback-less client call returns.
  • oauthScopes is now honored on the Thrift backend: OAuth client-secret M2M sends the configured scopes instead of always all-apis, so scoped service-principal secrets can authenticate, and U2M uses them in place of sql offline_access. On both backends, entries are split on whitespace and blank values fall back to those defaults. A token read from persistence that records different scopes from the ones the client would request is no longer reused or refreshed; the client acquires a new one (for U2M, through a new browser login). Tokens that don't record scopes are still reused. (#540)
  • Fix DECIMAL parameters losing their fractional digits on the Thrift backend: "123.45" was bound as decimal(3,0) and came back as 123. Both backends now send DECIMAL(p,s) derived from the value (also for the DEC / NUMERIC synonyms), stringify Int64 values beyond 2^53 exactly instead of as Infinity, accept exponent forms such as 1e-7 (rewritten as a plain numeral), and throw a ParameterError for non-numeric values or values that need more than 38 digits. (#474)
  • customHeaders are now sent on every Thrift request (session, statement and metadata calls), as the kernel backend already did, instead of only on telemetry and feature-flag requests. On these requests, caller values for driver-managed headers (Authorization, User-Agent, Content-Type, Content-Length, Transfer-Encoding, Connection) are ignored on both backends, and the Thrift backend rejects header names or values that cannot be sent at connect time. (#491)
  • Error telemetry now reports only the error class name and the server SQLSTATE. It no longer includes the error message or stack trace, which could contain table and column names from the query. On the Thrift backend, statement.complete telemetry now also reports the result delivery format (inline Arrow, inline columnar, or CloudFetch) and whether the server LZ4-compressed the result. (#508)
  • Avoid an extra full-buffer copy when downloading Thrift CloudFetch results.

3.0.0

  • Upgrade the native kernel backend to 1.4.0.
  • Breaking: require Node.js versions containing the CVE-2026-111497 Brotli decoder fix: 22.23.4+, 24.22.1+, or 26.12.1+. Node.js 20, 23, and 25 are no longer supported because those end-of-life lines have no fix.
  • Return empty results with the standard schema from Thrift getPrimaryKeys() when a catalog, schema, or table is missing, instead of throwing. (#553)
  • Update locked follow-redirects and serialize-javascript versions to remediate security findings.

2.4.0

  • Upgrade the native kernel backend to 1.3.0, including security fixes in the SQL kernel bindings.
  • Update locked follow-redirects and ip-address versions to remediate security findings.

2.3.0

  • Upgrade the native kernel backend to 1.2.0.
  • Add the enableGeoSpatialSupport option (default false): kernel GEOMETRY / GEOGRAPHY results return WKT / EWKT by default, or { srid, wkb } when enabled.
  • Preserve DECIMAL precision and scale in kernel result metadata.
  • Add escapeMetadataCatalogName (default false) to escape catalog underscores in metadata requests.
  • Fix getFunctions() catalog metadata and required-name validation; accept omitted or empty namespaces in kernel getPrimaryKeys().
  • Generalize the driver feature-flag cache and initialize it independently of telemetry.
  • Update security overrides for brace-expansion and ip-address.

2.2.0

  • Upgrade the kernel backend native packages to 1.1.0; the kernel dependency is now stable and no longer experimental.
  • Automatically recover default Thrift connections to Reyden/Real-Time SQL warehouses onto the kernel backend while preserving structured SQL errors. (#523)

2.1.0

  • Security behavior change: verify Thrift TLS certificates by default; add custom CA and mTLS options. (#463)
  • Upgrade the kernel backend to native package 1.0.0, including getTypeInfo() parity and interval-type fixes. (#512, #514, #516)
  • Add kernel Azure Entra authentication, static-token federation, and optional U2M token caching. (#501, #505, #509, #513)
  • Forward telemetry options to the kernel backend. (#506)
  • Add disableRowMaterialization for fetch-throughput benchmarks. (#465)
  • Add a connection-parameter reference comparing Thrift and SEA/kernel. (#457)

2.0.0

Breaking changes — completes the security cleanup that 1.17.0 could not do without breaking changes.

  • engines.node raised to >=20.0.0 (was >=14). Node 14/16/18 are dropped. Node 14 (EOL 2023-04), 16 (EOL 2023-09), and 18 (EOL 2025-04) are all past upstream end-of-life. The >=20 floor is also the minimum for the patched serialize-javascript (dev) — see below — and comfortably clears the kernel backend's own Node 18 requirement.
  • thrift ^0.16.0 → ^0.23.0 — clears GHSA-r67j-r569-jrwp (HIGH) and GHSA-526f-jxpj-jmg2. A direct runtime dep whose fix is a major bump.
  • uuid ^9.0.0 → ^11.1.1 — clears GHSA-w5hq-g745-h8pq (HIGH 7.5). uuid 11 dual-publishes ESM+CJS; the driver's CJS dist/ continues to require('uuid') unchanged. An overrides pin holds thrift's transitive uuid at 11 (uuid 13 is ESM-only and would break require()).

Security: with the above plus the overrides block carried from 1.17.0 (and serialize-javascript pinned to the patched ^7.0.5, which requires Node ≥20), OSV-Scanner reports zero findings — 0 CRITICAL / 0 HIGH / 0 MED / 0 LOW.

Closes #370.

1.17.0

Security (non-breaking): clears the non-breaking OSV-Scanner findings via a package.json overrides block plus a coherent dev-toolchain bump (mocha, eslint) — 2 CRITICAL (basic-ftp, form-data) plus the transitively-fixable HIGH/MED/LOW (ws, @75lb/deep-merge, ip-address, and the mocha-tree deps braces/micromatch/cross-spawn/minimatch/glob/@babel/*/js-yaml/path-to-regexp). No engine or runtime-API changes — a drop-in patch so consumers can clear critical/high scanner alerts without adopting the breaking 2.0.0 bump.

Known residual findings, all deferred because they can't be fixed without a breaking change (addressed in 2.0.0, #390):

  • thrift and uuid (HIGH) — direct runtime deps whose fixes are SemVer-major bumps (thrift 0.16→0.23, uuid 9→11).
  • serialize-javascript (dev-only) — its only patched versions (7.0.3+) require Node ≥20, which this release's non-breaking >=14 floor can't adopt. Dev-only: it's a test-reporter dependency, never present in the published tarball, never runs on a consumer machine.

Closes #386, #263.

1.16.0

  • New: optional kernel backend (useKernel: true). Adds an alternative connection path backed by the native @databricks/databricks-sql-kernel client (a Rust core exposed via napi-rs), shipped as prebuilt per-platform packages (linux x64/arm64 gnu+musl, macOS x64/arm64, Windows x64/arm64) pulled in automatically as optional dependencies. The kernel talks to Databricks over the SEA (Statement Execution API) HTTP transport — not Thrift — with CloudFetch and inline-Arrow result fetching, through the same DBSQLClient surface. Supports PAT and OAuth (M2M/U2M) auth. Requires Node >= 18; on older Node the binding is not loaded and useKernel: true raises a clear error directing you to the Thrift backend. The default backend remains Thrift — opt in per connection. (#378, #380, #409, #410, #411, #412, #416, #428, #434 by @msrathore-db)
  • Kernel backend behavior is aligned with Thrift so application code works the same either way: named/positional query parameters, metadata calls, TLS/mTLS with a custom CA, custom headers and user-agent, HTTP/SOCKS proxy and socket timeout, configurable retry/backoff, session query tags, async submit + cancel(), operation id/schema, and INTERVAL/type parity. Kernel logs surface through the same DBSQLLogger sink. (#417, #420, #421, #426, #430, #431 by @msrathore-db)
  • Make retry-policy knobs (max attempts, min/max backoff, overall timeout) configurable via connect() for both backends (#433 by @msrathore-db)
  • Retry transient network errors and fix a CloudFetch prefetch promise-rejection leak (#424 by @msrathore-db)
  • Telemetry: emit sql_operation, auth_type, and driver_connection_params (#396 by @samikshya-db)

1.15.0

  • Add SPOG routing support: parse ?o=<workspaceId> from httpPath and inject x-databricks-org-id on Thrift, telemetry, and feature-flag requests. Expose customHeaders on ConnectionOptions for caller-supplied headers (#391 by @samikshya-db)
  • Telemetry: enable by default with feature-flag-controlled priority, and fix final-flush dropping on client.close() due to a close-ordering bug (#327, #391 by @samikshya-db)
  • Fix Azure AD OAuth: tenant-aware discovery URL and correct scope resource (#363 by @msrathore-db)
  • Fix: use a valid SPDX license identifier in package.json (#389 by @sreekanth-db)

1.14.0

  • Add statement-level query tag support (#366 by @sreekanth-db)
  • Add AI coding agent detection to User-Agent header (#333 by @vikrantpuppala)
  • Internal: telemetry infrastructure improvements — circuit breaker, feature flag cache, telemetry client management (off by default) (#325, #326, #362)

1.13.0

  • Add token federation support with custom token providers (#318, #319, #320 by @madhav-db)
  • Add metric view metadata support (#312 by @shivam2680)
  • Fix: Avoid calling require('lz4') if it's really not required (#316 by @ikkala)
  • Add telemetry foundation (off by default) (#324 by @samikshya-db)
  • Telemetry event emission and per-host aggregation (#327 by @samikshya-db). Default change: telemetryEnabled now defaults to true (gated by a remote feature flag). To opt out programmatically, pass telemetryEnabled: false to connect(). To disable globally without code changes, set the environment variable DATABRICKS_TELEMETRY_DISABLED to one of 1, true, yes, or on (case-insensitive). Other values (empty, 0, false, etc.) are ignored — the runtime config takes precedence.

1.12.0

  • Support for session parameters (#307 by @sreekanth-db)
  • Add metric logging for cloud fetch (#305 by @shivam2680)

1.11.0

  • Enable cloud fetch by default (#287)
  • Added useLZ4Compression in ExecuteStatementOptions making compression configurable (#288)
  • Improve handling of extra / in URLs. Fixes #284 (#290)
  • Add thrift protocol version handling for driver features (#292)
  • Cleanup thrift fields that might be deprecated/removed in the future (#295)
  • Add lenient LZ4 check to handle dependecy errors gracefully. Fixes #289 #275 #266 #270 (#298)

1.10.0

  • Rename clientId parameter to userAgentEntry in connect call to standardize across sql drivers (#281)

1.9.0

  • Support iterable interface for IOperation (#252)
  • Allow any number type (number, bigint, Int64) for maxRows and queryTimeout (#255)
  • Support streaming query results via Node.js streams (#262)
  • Add custom auth headers into cloud fetch request (#267)
  • Support OAuth on databricks.azure.cn (#271)
  • Fix: Fix the type check in polyfills.ts (#254)

1.8.4

  • Fix: proxy agent unintentionally overwrites protocol in URL (#241)
  • Improve Array.at/TypedArray.at polyfill (#242 by @barelyhuman)
  • UC Volume ingestion: stream files instead of loading them into memory (#247)
  • UC Volume ingestion: improve behavior on SQL REMOVE (#249)
  • Expose session and query ID (#250)
  • Make lz4 module optional so package manager can skip it when cannot install (#246)

1.8.3

  • Improved retry behavior (#230)
  • Fix: in some cases library returned too many results (#239)

1.8.2

Improved results handling when running queries against older DBR versions (#232)

1.8.1

Security fixes:

An issue in all published versions of the NPM package ip allows an attacker to execute arbitrary code and obtain sensitive information via the isPublic() function. This can lead to potential Server-Side Request Forgery (SSRF) attacks. The core issue is the function's failure to accurately distinguish between public and private IP addresses.

1.8.0

Highlights

  • Retry failed CloudFetch requests (#211)
  • Fixed compatibility issues with Node@14 (#219)
  • Support Databricks OAuth on Azure (#223)
  • Support Databricks OAuth on GCP (#224)
  • Support LZ4 compression for Arrow and CloudFetch results (#216)
  • Fix OAuth M2M flow on Azure (#228)

OAuth on Azure

Some Azure instances now support Databricks native OAuth flow (in addition to AAD OAuth). For a backward compatibility, library will continue using AAD OAuth flow by default. To use Databricks native OAuth, pass useDatabricksOAuthInAzure: true to client.connect():

client.connect({
  // other options - host, port, etc.
  authType: 'databricks-oauth',
  useDatabricksOAuthInAzure: true,
  // other OAuth options if needed
});

Also, we fixed issue with AAD OAuth when wrong scopes were passed for M2M flow.

OAuth on GCP

We enabled OAuth support on GCP instances. Since it uses Databricks native OAuth, all the options are the same as for OAuth on AWS instances.

CloudFetch improvements

Now library will automatically attempt to retry failed CloudFetch requests. Currently, the retry strategy is quite basic, but it is going to be improved in the future.

Also, we implemented a support for LZ4-compressed results (Arrow- and CloudFetch-based). It is enabled by default, and compression will be used if server supports it.

1.7.1

  • Fix "Premature close" error which happened due to socket limit when intensively using library (#217)

1.7.0

  • Fixed behavior of maxRows option of IOperation.fetchChunk(). Now it will return chunks of requested size (#200)
  • Improved CloudFetch memory usage and overall performance (#204, #207, #209)
  • Remove protocol version check when using query parameters (#213)
  • Fix IOperation.hasMoreRows() behavior to avoid fetching data beyond the end of dataset. Also, now it will work properly prior to fetching first chunk (#205)

1.6.1

  • Make default logger singleton (#199)
  • Enable canUseMultipleCatalogs option when creating session (#203)

1.6.0

Highlights

  • Added proxy support (#193)
  • Added support for inferring NULL values passed as query parameters (#189)
  • Fixed bug with NULL handling for Arrow results (#195)

Proxy support

This feature allows to pass through proxy all the requests library makes. By default, proxy is disabled. To enable proxy, pass a configuration object to DBSQLClient.connect:

client.connect({
    // pass host, path, auth options as usual
    proxy: {
      protocol: 'http',  // supported protocols: 'http', 'https', 'socks', 'socks4', 'socks4a', 'socks5', 'socks5h'
      host: 'localhost', // proxy host (string)
      port: 8070,        // proxy port (number)
      auth: {            // optional proxy basic auth config
        username: ...
        password: ...
      },
    },
  })

Note: using proxy settings from environment variables is currently not supported

1.5.0

Highlights

  • Added OAuth M2M support (#168, #177)
  • Added named query parameters support (#162, #175)
  • runAsync options is now deprecated (#176)
  • Added staging ingestion support (#164)

Databricks OAuth support

Databricks OAuth support added in v1.4.0 is now extended with M2M flow. To use OAuth instead of PAT, pass a corresponding auth provider type and options to DBSQLClient.connect:

// instantiate DBSQLClient as usual

client.connect({
  // provide other mandatory options as usual - e.g. host, path, etc.
  authType: 'databricks-oauth',
  oauthClientId: '...', // optional - overwrite default OAuth client ID
  azureTenantId: '...', // optional - provide custom Azure tenant ID
  persistence: ...,     // optional - user-provided storage for OAuth tokens, should implement OAuthPersistence interface
})

U2M flow involves user interaction - the library will open a browser tab asking user to log in. To use this flow, no other options are required except for authType.

M2M flow does not require any user interaction, and therefore is a good option, say, for scripting. To use this flow, two extra options are required for DBSQLClient.connect: oauthClientId and oauthClientSecret.

Also see Databricks docs for more details about Databricks OAuth.

Named query parameters

v1.5.0 adds a support for query parameters. Currently only named parameters are supported.

Basic usage example:

// obtain session object as usual

const operation = session.executeStatement('SELECT :p1 AS "str_param", :p2 AS "number_param"', {
  namedParameters: {
    p1: 'Hello, World',
    p2: 3.14,
  },
});

The library will infer parameter types from passed primitive objects. Supported data types include booleans, various numeric types (including native BigInt and Int64 from node-int64), native Date type, and string.

It's also possible to explicitly specify the parameter type by passing DBSQLParameter instances instead of primitive values. It also allows one to use values that don't have a corresponding primitive representation:

import { ..., DBSQLParameter, DBSQLParameterType } from '@databricks/sql';

// obtain session object as usual

const operation = session.executeStatement('SELECT :p1 AS "date_param", :p2 AS "interval_type"', {
  namedParameters: {
    p1: new DBSQLParameter({
      value: new Date('2023-09-06T03:14:27.843Z'),
      type: DBSQLParameterType.DATE, // by default, Date objects are inferred as TIMESTAMP, this allows to override the type
    }),
    p2: new DBSQLParameter({
      value: 5, // INTERVAL '5' DAY
      type: DBSQLParameterType.INTERVALDAY
    }),
  },
});

Of course, you can mix primitive values and DBSQLParameter instances.

runAsync deprecation

Starting with this release, the library will execute all queries asynchronously, so we have deprecated the runAsync option. It will be completely removed in v2. So you should not use it going forward and remove all the usages from your code before version 2 is released. From user's perspective the library behaviour won't change.

Data ingestion support

This feature allows you to upload, retrieve, and remove unity catalog volume files using SQL PUT, GET and REMOVE commands.

1.4.0

  • Added Cloud Fetch support (#158)
  • Improved handling of closed sessions and operations (#129). Now, when session gets closed, all operations associated with it are immediately closed. Similarly, if client gets closed - all associated sessions (and their operations) are closed as well.

Notes:

Cloud Fetch is disabled by default. To use it, pass useCloudFetch: true to IDBSQLSession.executeStatement(). For example:

// obtain session object as usual
const operation = session.executeStatement(query, {
  runAsync: true,
  useCloudFetch: true,
});

Note that Cloud Fetch is effectively enabled only for really large datasets, so if the query returns only few thousands records, Cloud Fetch won't be enabled no matter what useCloudFetch setting is. Also gentle reminder that for large datasets it's better to use fetchChunk instead of fetchAll to avoid OOM errors:

do {
  const chunk = await operation.fetchChunk({ maxRows: 100000 });
  // process chunk here
} while (await operation.hasMoreRows());

1.3.0

  • Implemented automatic retry for some HTTP errors (429, 503) (#127)
  • Implemented request timeout + added option to configure it (#148)
  • Added OAuth (U2M) support for AWS and Azure (#147 and #154)
  • Fixed bug: for Arrow results, null values were ignored (@ivan-parada #151)

1.2.1

  • Added Azure AD support (#126)
  • Improved direct results handling (#134)
  • Updated API endpoint references in docs and samples (#137)
  • Code refactoring to improve maintainability

1.2.0

  • Added Apache Arrow support (#94)
  • Auth provider is now configurable (#120)

1.1.1

  • Fix: patch needed for improved error handling wasn't applied when installing 1.1.0

1.1.0

  • Fix: now library will not attempt to parse column names and will use ones provided by server (#84)
  • Better error handling: more errors can now be handled in specific .catch() handlers instead of being emitted as a generic error event (#99)
  • Fixed error logging bug (attempt to serialize circular structures) (#89)
  • Fixed some minor bugs and regressions

1.0.0

  • DBSQLClient.openSession now takes a limited set of options (OpenSessionRequest instead of Thrift's TOpenSessionReq)
  • DBSQLClient.openSession now uses the latest protocol version by default
  • Direct results feature is now available for all IOperation methods which support it. To enable direct results feature, maxRows option should be used
  • Direct results became enabled by default. If maxRows is omitted - it will default to 100000. To disable direct results, set maxRows to null
  • FunctionNameRequest type renamed to FunctionsRequest
  • IDBSQLConnectionOptions type renamed to ConnectionOptions
  • IFetchOptions renamed to FetchOptions
  • DBSQLOperation.getSchema will wait for operation completion, like DBSQLOperation.fetchChunk/DBSQLOperation.fetchAll. It also supports the same progress reporting options
  • runAsync option is now available for all operations that support it
  • Added logging functionality for logging on client side and added new optional logger param for DBSQLClient constructor
  • Turned on Direct results feature by default
  • Removed legacy Kerberos auth APIs

0.1.8-beta.2 (2022-09-08)

  • Operations will wait for cluster to start instead of failing
  • Added support for DirectResults, which speeds up data fetches by reducing the number of server roundtrips when possible
  • DBSQLOperation interface simplified: HiveUtils were removed and replaced with new methods DBSQLOperation.fetchChunk/DBSQLOperation.fetchAll. New API implements all necessary waiting and data conversion routines internally
  • Better TypeScript support
  • Thrift definitions updated to support additional Databricks features
  • User-agent string updated; a part of user-agent string is configurable through DBSQLClient's clientId option
  • Connection now uses keep-alive (not configurable at this moment)
  • DBSQLClient now prepends slash to path when needed
  • DBSQLOperation: default chunk size for data fetching increased from 100 to 100.000

Upgrading

DBSQLClient.utils was permanently removed. Code which used utils.waitUntilReady, utils.fetchAll and utils.getResult to get data should now be replaced with the single DBSQLOperation.fetchAll method. Progress reporting, previously supported by utils.waitUntilReady, is now configurable via DBSQLOperation.fetchChunk/DBSQLOperation.fetchAll options. DBSQLOperation.setMaxRows also became an option of methods mentioned above.

0.1.8-beta.1 (2022-06-24)

  • Initial release