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) viaclient.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 supportsPOST /v1/plugin/{type}/uploads.create_upload/complete_uploadfor running the steps yourself, for example to upload from a browser.complete_uploadis 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 asfiles.upload.query(connection, file_details, sql).connectiontakesbucket,region,accessKeyId,secretAccessKey, and optionallyendpoint,prefix,useSsl.
- REST connector (
rest_api, any HTTP API) viaclient.rest:check,inspectandrequest(connection, method, path, path_params=, params=, body=, body_type=, headers=, select=, paginate=, max_rows=, operation_id=, connection_id=). user_idanduser_roleclient arguments, sent asX-User-IdandX-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_apiwrites (any method other than GET, HEAD or OPTIONS) sent throughconnections.queryare 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-corebumped to>=0.3.0,<0.4(core 0.3.0 renamedPermissionError→AiceForbiddenErrornot referenced by this package, floor bumped purely to avoid a cross-package dependency conflict if installed alongsideaice-sandbox).
0.1.1
Changed
connections.processandconnections.cleanupnow passidempotency_key=Noneexplicitly, opting out ofaice-core0.2.0's new default auto-retry behavior.cleanupin particular is destructive, so a blind duplicate is the worst-case outcome.preprocess/query/inspectare unaffected and keep the new default (auto-generated key, retried on transient failure). TODO(backend): remove the overrides oncedata_brainconfirms it dedupes on theIdempotency-Keyheader.- 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_apiwrite sent throughconnections.querywas auto-retried on a 5xx and could run twice; writes are now sent once.
Added
filesfor the file connectors (csv_v2,excel,parquet,json):files.upload(connectionType, { file, filename, rectifyIssue })stores a file and returns itsfile_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 clienttimeoutapplies), then completes the upload. Each upload gets its own key, so the same name never replaces an earlier file. Needs a Data Brain withPOST /v1/plugin/{type}/uploads.files.createUpload/completeUploadfor running the steps yourself, for example to upload from a browser. Completing is not retried.files.query(connectionType, fileDetails, sql): query uploaded files.
s3for thes3connector, 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 shapefiles.uploadreturns.s3.query(connection, fileDetails, sql).
restfor therest_apiconnector:rest.check,rest.inspect,rest.request(connection, method, path, options).descriptors.list()returnsDescriptor[](wasunknown[]), includingshowWhenon conditional fields.userId/userRoleclient 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/core0.4.
0.1.1
Changed
connections.processandconnections.cleanupnow passidempotencyKey: nullexplicitly, opting out of@aiceafrica/core0.2.0's new default auto-retry behavior.preprocess/query/inspectkeep the new default. TODO(backend): remove the overrides oncedata_brainconfirms dedup support.