Changelog

Data Brain

Release notes for aice-data-brain and @aiceafrica/data-brain.

Python: aice-data-brain

0.2.0

Added

  • File connectors (csv_v2, excel, parquet, json) via client.files:
    • upload(connection_type, *, file, filename, rectify_issue=False) uploads a file through presigned storage and returns { file_details } (tables, columns, preview). The project key is never sent to storage. Each upload gets a unique key, so re-uploading a name does not overwrite an earlier file. Requires a Data Brain that supports POST /v1/plugin/{type}/uploads.
    • create_upload / complete_upload for running the steps yourself, for example to upload from a browser. complete_upload is not retried.
    • query(connection_type, file_details, sql).
  • S3 connector via client.s3: reads CSV/TSV, Parquet, JSON and Excel files in place from your own S3 or S3-compatible bucket. Data Brain stores nothing and never modifies the bucket.
    • list_objects(connection) lists readable files and doubles as a connection test.
    • describe(connection, object_names, *, rectify_issue=False) returns {"file_details": [...]}, the same shape as files.upload.
    • query(connection, file_details, sql).
    • connection takes bucket, region, accessKeyId, secretAccessKey, and optionally endpoint, prefix, useSsl.
  • REST connector (rest_api, any HTTP API) via client.rest: check, inspect and request(connection, method, path, path_params=, params=, body=, body_type=, headers=, select=, paginate=, max_rows=, operation_id=, connection_id=).
  • user_id and user_role client arguments, sent as X-User-Id and X-User-Role.
  • Every resource is available on both the sync and async clients.

Fixed

  • Requests now use the service's routes: /v1/plugin/{type}/{action} and /v1/datasource-descriptors.
  • connections.query(type, *, query, data=None) sends the request body the service expects and no longer accepts extra keyword arguments.
  • rest_api writes (any method other than GET, HEAD or OPTIONS) sent through connections.query are no longer retried on a 5xx, which could run them twice.

Changed

  • Supports aice-core>=0.3.0,<0.5.

0.1.2

Changed

  • Dependency floor on aice-core bumped to >=0.3.0,<0.4 (core 0.3.0 renamed PermissionError → AiceForbiddenError not referenced by this package, floor bumped purely to avoid a cross-package dependency conflict if installed alongside aice-sandbox).

0.1.1

Changed

  • connections.process and connections.cleanup now pass idempotency_key=None explicitly, opting out of aice-core 0.2.0's new default auto-retry behavior. cleanup in particular is destructive, so a blind duplicate is the worst-case outcome. preprocess/query/inspect are unaffected and keep the new default (auto-generated key, retried on transient failure). TODO(backend): remove the overrides once data_brain confirms it dedupes on the Idempotency-Key header.
  • Requires aice-core>=0.2.0,<0.3.

TypeScript: @aiceafrica/data-brain

0.2.0 (unreleased)

Fixed

  • Every route now matches the service: /v1/plugin/{type}/{action} (was /connections/…) and /v1/datasource-descriptors (was /descriptors). Earlier versions could not reach a real Data Brain.
  • connections.query(type, { data, query }) sends the body the service expects, { data, query: { query } }. A plain SQL string is still accepted.
  • A rest_api write sent through connections.query was auto-retried on a 5xx and could run twice; writes are now sent once.

Added

  • files for the file connectors (csv_v2, excel, parquet, json):
    • files.upload(connectionType, { file, filename, rectifyIssue }) stores a file and returns its file_details (tables, columns, preview). It uses Data Brain's presigned uploads: it asks for a signed form, posts the file straight to Data Brain's storage (the project key never goes there, and the client timeout applies), then completes the upload. Each upload gets its own key, so the same name never replaces an earlier file. Needs a Data Brain with POST /v1/plugin/{type}/uploads.
    • files.createUpload / completeUpload for running the steps yourself, for example to upload from a browser. Completing is not retried.
    • files.query(connectionType, fileDetails, sql): query uploaded files.
  • s3 for the s3 connector, which reads CSV/TSV, Parquet, JSON and Excel files in place from your own S3 or S3-compatible bucket. Nothing is stored by Data Brain and nothing in the bucket is deleted; the bucket details travel with every call.
    • s3.listObjects(connection): readable files under the prefix (also a connection test).
    • s3.describe(connection, objectNames, { rectifyIssue }): returns { file_details }, the same shape files.upload returns.
    • s3.query(connection, fileDetails, sql).
  • rest for the rest_api connector: rest.check, rest.inspect, rest.request(connection, method, path, options).
  • descriptors.list() returns Descriptor[] (was unknown[]), including showWhen on conditional fields.
  • userId / userRole client options (X-User-Id / X-User-Role).
  • VERSION, this package's version.
  • Exported types: FileDetails, UploadResult, CreateUploadResult, QueryResult, QueryPayload, Descriptor, DescriptorField, S3Connection, S3Object, S3ListResult, S3DescribeOptions, RestConnection, RestAuth, RestPagination, RestRequestOptions.

Changed

  • Needs @aiceafrica/core 0.4.

0.1.1

Changed

  • connections.process and connections.cleanup now pass idempotencyKey: null explicitly, opting out of @aiceafrica/core 0.2.0's new default auto-retry behavior. preprocess/query/inspect keep the new default. TODO(backend): remove the overrides once data_brain confirms dedup support.

On this page