dot-UploadWithQuery.httpapi: Common function called by all upload methods. Upload bytes or...

.UploadWithQuery.httpapiR Documentation

Common function called by all upload methods. Upload bytes or text to SciDB as an attachment to a query. The query must contain an input() or aio_input() operator that reads data from the attached file (whose name matches desc@filename) and does something with it; usually, the query uses store() to write the data into a new array.

Description

Common function called by all upload methods. Upload bytes or text to SciDB as an attachment to a query. The query must contain an input() or aio_input() operator that reads data from the attached file (whose name matches desc@filename) and does something with it; usually, the query uses store() to write the data into a new array.

Usage

.UploadWithQuery.httpapi(db, data, query, schema, content_type, desc)

Arguments

db

scidb database connection returned from scidbconnect

data

the data to upload, as text or raw bytes

query

an AFL query to process the uploaded data (and, usually, to store it into an array). The query must contain an operator that reads from a file whose name is equal to desc@filename.

schema

the schema of the array, only needed if desc@temp is TRUE

content_type

the HTTP Content-Type header to use for the attachment

desc

an UploadDesc which must have an @array_name and @filename set

Value

if the query returns data, this function returns the raw data from the HTTP response. If the query doesn't return anything (e.g. if it's a store() query), this function returns NULL. If the server returns any status code outside of the 200 successful range, this function stops with a message that includes the content of the error page returned by the server.


Paradigm4/SciDBR documentation built on Nov. 9, 2023, 4:58 a.m.