connect

Create a connection to the MapD server, generating a client and session ID.

connect(callback: Function): MapdCon
Parameters
callback (Function) A callback that takes (err, success) as its signature. Returns con singleton if successful.
Returns
MapdCon: Object.
Example

Connect to a MapD server:

var con = new MapdCon()
  .host('localhost')
  .port('8080')
  .dbName('myDatabase')
  .user('foo')
  .password('bar')
  .connect((err, con) => console.log(con.sessionId()));

  // ["om9E9Ujgbhl6wIzWgLENncjWsaXRDYLy"]

disconnect

Disconnect from the server and then clear the client and session values.

disconnect(callback: Function): MapdCon
Parameters
callback (Function) A callback that takes (err, success) as its signature. Returns con singleton if successful.
Returns
MapdCon: Object.
Example

Disconnect from the server:

con.sessionId() // ["om9E9Ujgbhl6wIzWgLENncjWsaXRDYLy"]
con.disconnect((err, con) => console.log(err, con))
con.sessionId() === null;

getFrontendViewsAsync

Get the recent Immerse dashboards as a list of TFrontendView objects. These objects contain a value for the view_name property, but not for the view_state property.

getFrontendViewsAsync
Returns
Promise<Array<TFrontendView>>: An array that has all saved dashboards.
Example

Get the list of Immerse dashboards from the server:

con.getFrontendViewsAsync().then((results) => console.log(results))
// [TFrontendView, TFrontendView]

getFrontendViewAsync

Get a dashboard object containing a value for the view_state property. This object contains a value for the view_state property, but not for the view_name property.

getFrontendViewAsync
Parameters
viewName (String) The name of the dashboard.
Returns
Promise<Object>: An object that contains all data and metadata related to the dashboard.
Example

Get a specific dashboard from the server:

con.getFrontendViewAsync('view_name').then((result) => console.log(result))
// {TFrontendView}

getServerStatusAsync

Get the status of the server as a TServerStatus object. This includes the server version number, whether the server is read-only, and whether backend rendering is enabled.

getServerStatusAsync
Returns
Promise<Object>: An object that contains information about the server status.
Example

Get the server status:

con.getServerStatusAsync().then((result) => console.log(result))
// {
//   "read_only": false,
//   "version": "3.0.0dev-20170503-40e2de3",
//   "rendering_enabled": true,
//   "start_time": 1493840131
// }

getStatusAsync

Get the status of the server as a TServerStatus object. This includes the server version number, whether the server is read-only, and whether backend rendering is enabled.

getStatusAsync
Returns
Promise<Object>: An object that contains information about the server status.
Example

Get the server status:

con.getStatusAsync().then((result) => console.log(result))
// [{
//   "read_only": false,
//   "version": "3.0.0dev-20170503-40e2de3",
//   "rendering_enabled": true,
//   "start_time": 1493840131
// }]

getHardwareInfoAsync

Get information about the server hardware:

  • Number of GPUs.
  • Number of GPUs allocated to MapD.
  • Start GPU.
  • Number of SMs, SMXs, or CUs (streaming multiprocessors).
  • Clock frequency of each GPU.
  • Physical memory of each GPU.
  • Compute capability of each GPU.
getHardwareInfoAsync
Returns
Promise<Object>: An object that contains hardware information.
Example

Get server hardware information:

con.getHardwareInfoAsync().then((result) => console.log(result))
{
  "hardware_info": [{
   "num_gpu_hw": 2,
     "num_cpu_hw": 12,
     "num_gpu_allocated": 2,
     "start_gpu": 0,
     "host_name": "",
     "gpu_info": [{
         "num_sm": 28,
         "clock_frequency_kHz": 1531000,
         "memory": 12781682688,
         "compute_capability_major": 6,
         "compute_capability_minor": 1
     }, {
         "num_sm": 28,
         "clock_frequency_kHz": 1531000,
         "memory": 12782075904,
         "compute_capability_major": 6,
         "compute_capability_minor": 1
     }]
  }]
}

createFrontendViewAsync

Add a new dashboard to the server.

createFrontendViewAsync(viewName: String, viewState: String, imageHash: String, metaData: String): Promise
Parameters
viewName (String) The name of the new dashboard.
viewState (String) The Base64-encoded state string of the new dashboard.
imageHash (String) The numeric hash of the dashboard thumbnail.
metaData (String) Stringified metadata related to the view.
Returns
Promise: Returns empty if successful.
Example

Add a new dashboard to the server:

con.createFrontendViewAsync('newSave', 'viewstateBase64', null, 'metaData').then(res => console.log(res))

deleteFrontendViewAsync

Delete a dashboard object containing a value for the viewState property.

deleteFrontendViewAsync
Parameters
viewName (String) The name of the dashboard.
Returns
Promise<String>: The name of dashboard deleted.
Example

Delete a specific dashboard from the server:

con.deleteFrontendViewAsync('view_name').then(res => console.log(res))

createLinkAsync

Create a short hash to make it easy to share a link to a specific dashboard.

createLinkAsync(viewState: String, metaData: String): Promise<Array<String>>
Parameters
viewState (String) The Base64-encoded state string of the new dashboard.
metaData (String) Stringified metadata related to the link.
Returns
Promise<Array<String>>: A short hash of the dashboard used for URLs.
Example

Create a link to the current state of a dashboard:

con.createLinkAsync("eyJuYW1lIjoibXlkYXNoYm9hcmQifQ==", 'metaData').then(res => console.log(res));
// ["28127951"]

getLinkViewAsync

Get a fully formed dashboard object from a generated share link. This object contains the link for the view_name property.

getLinkViewAsync
Parameters
link (String) The short hash of the dashboard; see createLink .
Returns
Promise<Object>: Object of the dashboard and metadata.
Example

Get a dashboard from a link:

con.getLinkViewAsync('28127951').then(res => console.log(res))
//  {
//    "view_name": "28127951",
//    "view_state": "eyJuYW1lIjoibXlkYXNoYm9hcmQifQ==",
//    "image_hash": "",
//    "update_time": "2017-04-28T21:34:01Z",
//    "view_metadata": "metaData"
//  }

getFirstGeoFileInArchiveAsync

Get the first geo file in an archive, if present, to determine if the archive should be treated as geo.

getFirstGeoFileInArchiveAsync
Parameters
archivePath (String) The base filename of the archive.
copyParams (TCopyParams) See TCopyParams
Returns
Promise<String>: Full path to the located geo file; otherwise, to the original archivePath.
Example

Get the first geo file in an archive:

con.getFirstGeoFileInArchiveAsync('archive.zip', {}).then(res => console.log(res))

getUsersAsync

Get a list of all users on the database for this connection.

getUsersAsync
Returns
Promise<Array>: A list of all users (strings).
Example

Get a list of all users:

con.getUsersAsync().then(res => console.log(res))

getRolesAsync

Get a list of all roles on the database for this connection.

getRolesAsync
Returns
Promise<Array>: A list of all roles (strings).
Example

Get a list of all roles:

con.getRolesAsync().then(res => console.log(res))

getDashboardsAsync

Get a list of all dashboards on the database for this connection.

getDashboardsAsync
Returns
Promise<Array<TDashboard>>: A list of all dashboards (Dashboard objects).
Example

Get a list of all dashboards:

con.getDashboardsAsync().then(res => console.log(res))

getDashboardAsync

Get a single dashboard.

getDashboardAsync
Parameters
dashboardId (Number) The ID of the dashboard.
Returns
Promise<TDashboard>: The dashboard (Dashboard object).
Example

Get a dashboard:

con.getDashboardAsync().then(res => console.log(res))

createDashboardAsync

Add a new dashboard to the server.

createDashboardAsync
Parameters
dashboardName (String) The name of the new dashboard.
dashboardState (String) The Base64-encoded state string of the new dashboard.
imageHash (String) The numeric hash of the dashboard thumbnail.
metaData (String) Stringified metadata related to the view.
Returns
Promise: Returns a Promise.all result (array) of the IDs created on each client.
Example

Add a new dashboard to the server:

con.createDashboardAsync('newSave', 'dashboardstateBase64', null, 'metaData').then(res => console.log(res))

replaceDashboardAsync

Replace a dashboard on the server with new properties.

replaceDashboardAsync
Parameters
dashboardId (Number) The ID of the dashboard to replace.
dashboardName (String) The name of the new dashboard.
dashboardOwner (String) User ID of the owner of the dashboard.
dashboardState (String) The Base64-encoded state string of the new dashboard.
imageHash (String) The numeric hash of the dashboard thumbnail.
metaData (String) Stringified metadata related to the view.
Returns
Promise: Returns empty if successful, rejects if any client failed.
Example

Replace a dashboard on the server:

con.replaceDashboardAsync(123, 'replaceSave', 'owner', 'dashboardstateBase64', null, 'metaData').then(res => console.log(res))

deleteDashboardAsync

Delete a dashboard object containing a value for the view_state property.

deleteDashboardAsync
Parameters
dashboardId (Number) The ID of the dashboard.
Returns
Promise: Returns empty if successful, rejects if any client failed.
Example

Delete a specific dashboard from the server:

con.deleteDashboardAsync(123).then(res => console.log(res))

shareDashboardAsync

Share a dashboard (GRANT a certain set of permissions to a specified list of groups).

shareDashboardAsync
Parameters
dashboardId (Number) The ID of the dashboard.
groups (Array<String>) The roles and users that can access the dashboard.
objects (Array<String>) The database objects (tables) that groups can see.
permissions (Array<String>) Permissions granted to the groups.
Returns
Promise: Returns empty if successful.
Example

Share a dashboard:

con.shareDashboardAsync(123, ['group1', 'group2'], ['object1', 'object2'], ['perm1', 'perm2']).then(res => console.log(res))

unshareDashboardAsync

Stop sharing a dashboard (REVOKE a certain set of permission from a specified list of groups).

unshareDashboardAsync
Parameters
dashboardId (Number) The ID of the dashboard.
groups (Array<String>) The roles and users that can access it.
objects (Array<String>) The database objects (tables) that groups can see.
permissions (Array<String>) Permissions revoked from the groups.
Returns
Promise: Returns empty if successful.
Example

Unshare a dashboard:

con.unshareDashboardAsync(123, ['group1', 'group2'], ['object1', 'object2'], ['perm1', 'perm2']).then(res => console.log(res))

getDashboardGranteesAsync

Get the list of users that a dashboard has been shared with; that is, those users who have been granted permissions to the dashboard.

getDashboardGranteesAsync
Parameters
dashboardId (Number) The ID of the dashboard.
Returns
Promise: Returns the list of users (array).
Example

Get the list of grantees for a dashboard:

con.getDashboardGranteesAsync(123).then(res => console.log(res))

getDbObjectsForGranteeAsync

Get a list of database objects granted to a role; that is, those objects the role has permissions to access.

getDbObjectsForGranteeAsync
Parameters
roleName (String) The name of the role.
Returns
Promise: Returns the list of database object names (strings).
Example

Get list of accessible database objects for a role:

con.getDbObjectsForGranteeAsync('role').then(res => console.log(res))

getDbObjectPrivsAsync

Get the privileges for the current user for a specified database object.

getDbObjectPrivsAsync
Parameters
objectName (String) The name or ID of the object.
type (TDBObjectType) The type of the database object.
Returns
Promise: Returns the list of database object names (strings).
Example

Get the list of accessible database objects for a role:

con.getDbObjectsForGranteeAsync('role').then(res => console.log(res))

detectColumnTypesAsync

Asynchronously get data from an importable file, such as a CSV or plaintext file with a header.

detectColumnTypesAsync(fileName: String, copyParams: TCopyParams): Promise<TDetectResult>
Parameters
fileName (String) The name of the importable file.
copyParams (TCopyParams) See TCopyParams
Returns
Promise<TDetectResult>: An object that has copy_params and row_set .
Example

Get data from table_data.csv:

var copyParams = new TCopyParams();
con.detectColumnTypesAsync('table_data.csv', copyParams).then(res => console.log(res))
// TDetectResult {row_set: TRowSet, copy_params: TCopyParams}

query

Submit a query to the database and process the results.

query(query: String, options: Object, callback: Function): Object
Parameters
query (String) The query to perform.
options (Object) Options for the query.
callback (Function) A callback function with the signature (err, result) => result .
Returns
Object: The result of the query.
Example

Create a query:

var query = "SELECT count(*) AS n FROM tweets_nov_feb WHERE country='CO'";
var options = {};

con.query(query, options, function(err, result) {
       console.log(result)
     });

validateQuery

Submit a query to validate that the backend can create a result set based on the SQL statement.

validateQuery(query: String): Promise<Object>
Parameters
query (String) The query to perform.
Returns
Promise<Object>: The result of whether the query is valid.
Example

Create a query and determine if it is valid:

var query = "SELECT count(*) AS n FROM tweets_nov_feb WHERE country='CO'";

con.validateQuery(query).then(res => console.log(res))

// [{
//    "name": "n",
//    "type": "INT",
//    "is_array": false,
//    "is_dict": false
//  }]

getTablesAsync

Get the names of the databases that exist in the current session connection.

getTablesAsync(): Promise<Array<Object>>
Returns
Promise<Array<Object>>: List of table objects containing the label and table names.
Example

Get the list of tables from a connection:

con.getTablesAsync().then(res => console.log(res))

 //  [{
 //    label: 'obs', // deprecated property
 //    name: 'myTableName'
 //   },
 //  ...]

getTablesWithMetaAsync

Get names and catalog metadata for tables that exist on the current session's connection.

getTablesWithMetaAsync(): Promise<Array<Object>>
Returns
Promise<Array<Object>>: The list of objects containing table metadata.
Example

Get the list of tables with metadata from a connection:

con.getTablesWithMetaAsync().then(res => console.log(res))

 [
  {
   name: 'my_table_name',
   col_datum_types: [TDatumType::BOOL, TDatumType::DOUBLE],
   is_view: false,
   is_replicated: false,
   shard_count: 0,
   max_rows: -1
  },
 ...]

getCompletionHints

Submits an SQL string to the backend and returns a completion hints object.

getCompletionHints(queryString: String, options: Object, callback: Function): Array
Parameters
queryString (String) A fragment of SQL input.
options (Object) An options object continaing the current cursor position, 1-indexed from the start of queryString .
callback (Function) A callback function with the signature (err, result) => result .
Returns
Array: An array of completion hints objects that contains the completion hints.
Example
const queryString = "f";
const cursor = 1;

con.getCompletionHints(queryString, cursor, function(error, result) {
       console.log(result)
     });

 [{
   hints: ["FROM"],
   replaced: "f",
   type: 7
  }]

invertDatumTypes

Create an array-like object from TDatumType by changing the order of the string key and numerical value.

invertDatumTypes(): Undefined
Returns
Undefined: This function does not return anything.

getFields

Get a list of field objects for a specified table.

getFields(tableName: String, callback: Function): Array<Object>
Parameters
tableName (String) Name of table containing field names.
callback (Function) A callback that takes ( err, results ).
Returns
Array<Object>: The formatted list of field objects.
Example

Get the list of fields from a specific table:

con.getFields('flights', (err, res) => console.log(res))
// [{
  name: 'fieldName',
  type: 'BIGINT',
  is_array: false,
  is_dict: false
}, ...]

createTableAsync

Create a table and persist it to the backend.

createTableAsync
Parameters
tableName (String) The name of the new table.
rowDescObj (Array<TColumnType>) Fields in the new table.
tableType (Number<TTableType>) The types of tables a user can import into the database.
createParams (TCreateParams) Properties to apply to the new table (e.g. replicated)
Returns
Promise<undefined>: Generates an error if unsuccessful, or returns undefined if successful.
Example

Create a new table:

con.createTable('mynewtable', [TColumnType, TColumnType, ...], 0).then(res => console.log(res));
 // undefined

importTableAsync

Import a delimited table from a file.

importTableAsync
Parameters
tableName (String) The name of the new table.
fileName (String) The name of the file containing the table.
copyParams (TCopyParams) See TCopyParams
headers (Array<TColumnType>) A collection of metadata related to the table headers.

importTableGeoAsync

Import a geo table from a file.

importTableGeoAsync
Parameters
tableName (String) The name of the new geo table.
fileName (String) The name of the file containing the table.
copyParams (TCopyParams) See TCopyParams
headers (Array<TColumnType>) A colleciton of metadata related to the table headers.

renderVega

Use for backend rendering. This method fetches a PNG image that is a render of the Vega JSON object.

renderVega(widgetid: Number, vega: String, options: Object, callback: Function): Image
Parameters
widgetid (Number) The widget ID of the calling widget.
vega (String) The Vega JSON.
options (Object) The options for the render query.
Name Description
options.compressionLevel Number The PNG compression level. Range: 1 (low compression, faster) to 10 (high compression, slower). Default: 3.
callback (Function) Takes (err, success) as its signature. Returns con singleton if successful.
Returns
Image: Base64 image.

getResultRowForPixel

Used primarily for backend-rendered maps; fetches the row for a specific table that was last rendered at a pixel.

getResultRowForPixel(widgetId: any, pixel: TPixel, tableColNamesMap: Object, callbacks: Array<Function>, pixelRadius: Number?, Number: widgetId, tableName: String)
Parameters
widgetId (any)
pixel (TPixel) The pixel. The lower-left corner is pixel (0,0).
tableColNamesMap (Object) Map of the object of tableName to the array of column names.
callbacks (Array<Function>) A collection of callbacks.
pixelRadius (Number? = 2) The radius around the primary pixel to search within.
Number (widgetId) The widget ID of the caller.
tableName (String) The table containing the geo data.

processPixelResults

Formats the pixel results into the same pattern as textual results.

processPixelResults(callbacks: Array<Function>, error: Object, results: (Array | Object)): Object
Parameters
callbacks (Array<Function>) A collection of callbacks.
error (Object) An error if thrown; otherwise null.
results ((Array | Object)) Unformatted results of pixel rowId information.
Returns
Object: An object with the pixel results formatted for display.

sessionId

Get or set the session ID used by the server to serve the correct data. This is typically set by connect and should not be set manually.

sessionId(sessionId: Number): (Number | MapdCon)
Parameters
sessionId (Number) The session ID of the current connection.
Returns
(Number | MapdCon): The session ID or MapD connector itself.
Example

Get the session ID:

con.sessionId();
// sessionID === 3145846410

Set the session ID:

var con = new MapdCon().connect().sessionId(3415846410);
// NOTE: It is generally unsafe to set the session ID manually.

host

Get or set the connection server hostname. This is is typically the first method called after instantiating a new MapdCon.

host(host: String): (String | MapdCon)
Parameters
host (String) The hostname address.
Returns
(String | MapdCon): The hostname or MapD connector itself.
Example

Set the hostname:

var con = new MapdCon().host('localhost');

Get the hostname:

var host = con.host();
// host === 'localhost'

port

Get or set the connection port.

port(port: String): (String | MapdCon)
Parameters
port (String) The port to connect on.
Returns
(String | MapdCon): The port or MapD connector itself.
Example

Set the port:

var con = new MapdCon().port('8080');

Get the port:

var port = con.port();
// port === '8080'

user

Get or set the username with which to authenticate.

user(user: String): (String | MapdCon)
Parameters
user (String) The username with which to authenticate.
Returns
(String | MapdCon): The username or MapD connector itself.
Example

Set the username:

var con = new MapdCon().user('foo');

Get the username:

var username = con.user();
// user === 'foo'

password

Get or set the user password for authentication.

password(password: String): (String | MapdCon)
Parameters
password (String) The password with which to authenticate.
Returns
(String | MapdCon): The password or MapD connector itself.
Example

Set the password:

var con = new MapdCon().password('bar');

Get the username:

var password = con.password();
// password === 'bar'

dbName

Get or set the name of the database to connect to.

dbName(dbName: String): (String | MapdCon)
Parameters
dbName (String) The database to connect to.
Returns
(String | MapdCon): The name of the database or the MapD connector itself.
Example

Set the database name:

var con = new MapdCon().dbName('myDatabase');

Get the database name:

var dbName = con.dbName();
// dbName === 'myDatabase'

logging

Configure whether raw query strings are logged to the console. Used primarily for debugging; false by default.

logging(logging: Boolean): (Boolean | MapdCon)
Parameters
logging (Boolean) Set to true to enable logging.
Returns
(Boolean | MapdCon): The current logging flag or MapD connector itself.
Example

Set logging to true:

var con = new MapdCon().logging(true);

Get the logging flag:

var isLogging = con.logging();
// isLogging === true

platform

The name of the platform.

platform(platform: String): (String | MapdCon)
Parameters
platform (String) The platform; "mapd" by default.
Returns
(String | MapdCon): The platform or MapD connector itself.
Example

Set the platform name:

var con = new MapdCon().platform('myPlatform');

Get the platform name:

var platform = con.platform();
// platform === 'myPlatform'

numConnections

Get the number of connections that are currently open.

numConnections(): Number
Returns
Number: The number of open connections.
Example

Get the number of connections:

var numConnections = con.numConnections();
// numConnections === 1

protocol

The protocol to use for requests.

protocol(protocol: String): (String | MapdCon)
Parameters
protocol (String) http or https .
Returns
(String | MapdCon): The protocol or MapdCon itself.
Example

Set the protocol:

var con = new MapdCon().protocol('http');

Get the protocol:

var protocol = con.protocol();
// protocol === 'http'

getEndpoints

Generates a list of endpoints from the connection parameters.

getEndpoints(): Array<String>
Returns
Array<String>: List of endpoints.
Example

Get the endpoints:

var con = new MapdCon().protocol('http').host('localhost').port('8000');
var endpoints = con.getEndpoints();
// endpoints === [ 'http://localhost:8000' ]

processColumnarResults

Process the column-based results from the query in a row-based format. (Returning row-based results directly from the server is inefficient.)

processColumnarResults(data: TRowSet, eliminateNullRows: Boolean, dataEnum: Object): Object
Parameters
data (TRowSet) The column-based data returned from a query.
eliminateNullRows (Boolean) A flag that removes null rows from results.
dataEnum (Object) A list of types created from when executing #invertDatumTypes .
Returns
Object: The formatted results of the query.

processQueryResults

Determines how to process raw results when they return from the server.

processQueryResults(logging: Boolean, updateQueryTimes: Function, options: Object, callback: Array<Function>, result: Object): Object
Parameters
logging (Boolean) If enabled, shows on the console how long the query took to run.
updateQueryTimes (Function) A function that updates internal query times on the connector.
options (Object) A list of options for processing the results.
Name Description
options.isImage Boolean Set to true when querying for backend-rendered images.
options.eliminateNullRows Boolean Removes null rows.
options.query String The SQL query string used only for logging.
options.queryId Number The ID of the query.
options.conId Number The unique connector identification.
options.estimatedQueryTime String The estimate of the query time.
callback (Array<Function>) The same callback coming from #query .
result (Object) The query result used to decide whether to process as column or row results.
Returns
Object: Null if image with callbacks, result if image with callbacks, otherwise formatted results.

processRowResults

Query for row-based results from the server. In general, is inefficient and should be avoided. Instead, use processColumnarResults and then convert the results to
row-based format.

processRowResults(data: TRowSet, eliminateNullRows: Boolean, datumEnum: Object): Object
Parameters
data (TRowSet) The row-based data returned from a query.
eliminateNullRows (Boolean) Flag that removes null rows from results.
datumEnum (Object) A list of types created from when executing #invertDatumTypes .
Returns
Object: The formatted results of the query.
Example
<caption> Return row-based results directly from the server:

TRow

A row of data in a table.

TRow

Type: TRow

Properties
cols (Array<TDatum>) : The array of individual data cells in a table.

TTableType

The types of tables that uploaded through the importer TTableType.

TTableType

Type: TTableType

Properties
DELIMITED (Number) : =0
POLYGON (Number) : =1

TTypeInfo

The information about a particular field in a given table.

TTypeInfo

Type: TTypeInfo

Properties
encoding (Number)
is_array (Boolean)
nullable (Boolean)
type (Number)

TDatumType

The valid types for database field values.

TDatumType

Type: Object

Properties
SMALLINT (Number) : =0
INT (Number) : =1
BIGINT (Number) : =2
FLOAT (Number) : =3
DECIMAL (Number) : =4
DOUBLE (Number) : =5
STR (Number) : =6
TIME (Number) : =7
TIMESTAMP (Number) : =8
DATE (Number) : =9
BOOL (Number) : =10
INTERVAL_DAY_TIME (Number) : =11
INTERVAL_YEAR_MONTH (Number) : =12
POINT (Number) : =13
LINESTRING (Number) : =14
POLYGON (Number) : =15
MULTIPOLYGON (Number) : =16
TINYINT (Number) : =17
GEOMETRY (Number) : =18
GEOGRAPHY (Number) : =19

TImportStatus

Import completion status of a table.

TImportStatus

Type: TImportStatus

Properties
elapsed (Number)
rows_completed (Number)
rows_estimated (Number)

completion_hints

The types of the completion hint response object.

completion_hints

Type: completion_hints

Properties
session (TSessionId)
sql (String)
cursor (Number)

TDatum

The value and state of an individual data cell in a table.

TDatum

Type: TDatum

Properties
is_null (Boolean)
val (TDatumVal)

TDetectResult

Contains the result from calling detectColumnTypes.

TDetectResult

Type: TDetectResult

Properties
copy_params (TCopyParams)
row_set (TRowSet)

TColumnType

TColumnType

Type: TColumnType

Properties
col_name (String) : The name of the table field.
col_type (TTypeInfo) : The information about the field.

TRowSet

Contains parsed table data.

TRowSet

Type: TRowSet

Properties
columns (Array)
is_columnar (Boolean)
row_desc (Array<TColumnType>) : A list of field names and their associated information.
rows (Array<TRow>)

TServerStatus

The permissions granted by the server.

TServerStatus

Type: TServerStatus

Properties
read_only (Boolean) : Indicates whether the server accepts write operations, such as saving.
rendering_enabled (Boolean) : Indicates whether backend rendering is enabled on the server.
version (String) : The current version of the server.

TFrontendView

The data stored for a dashboard.

TFrontendView

Type: TFrontendView

Properties
image_hash (String) : The lookup hash for the dashboard thumbnail image.
update_time (String) : The timestamp from the last saved update.
view_name (String) : The name of the dashboard or the shortened share link hash.
view_state (String) : The Base64-encoded string containing the details about the current state of the dashboard.

TCopyParams

The configuration required to import a table into MapD. See detectColumnTypes for a usage example.

TCopyParams

Type: TCopyParams

Properties
array_begin (String) : =null
array_delim (String) : =null
array_end (String) : =null
delimiter (String) : ="" - The delimiter character; for example, comma, [ TAB ] , or pipe.
escape (String) : =null
has_header (Boolean) : =null
line_delim (String) : =null
null_str (String) : ="" - The token used by the table to express a null value; for example, some systems use 'nil' or 'none'.
quote (String) : =null
quoted (Boolean) : =true - Indicates whether the string fields should be wrapped in quotes.
threads (Number) : =null

TDatumVal

The value of an individual cell in a table.

TDatumVal

Type: TDatumVal

Properties
arr_val (Array)
int_val (Number)
real_val (Number)
str_val (String)