Comment on page
Databases
The database data object is used to represent a Parquet-format database in the platform. When using the database in Spark SQL you can use either the shorter
databaseName
or in the case of possible duplicates, the longer uniqueDatabaseName.
Additional metadata related to databases can be stored in properties.Describes a database data object. A project ID can be given to request user-provided metadata from a particular project but it is not necessary as database data object belongs only to one project at all times. Cloning of database data object is suppressed. Relocate method is available for moving a database data object from one project to another one.
project
string (optional) Project or container ID to be used as a hint for finding the object in an accessible projectdefaultFields
boolean (optional, default false iffields
is supplied, true otherwise) whether to include the default set of fields in the output (the default fields are described in the "Outputs" section below). The selections are overridden by any fields explicitly named infields
.fields
mapping (optional) include or exclude the specified fields from the output. These selections override the settings indefaultFields
.- key Desired output field; see the "Outputs" section below for valid values here
- value boolean whether to include the field
The following options are deprecated (and will not be respected if
fields
is present):properties
boolean (optional, default false) Whether the properties should be returneddetails
boolean (optional, default false) Whether the details should also be returned
id
string The object ID (i.e. the string "database-xxxx")
The following fields are included by default (but can be disabled using
fields
or defaultFields
):project
string ID of the project or container in which the object was foundclass
string The value "database"databaseName
string The suffix ofuniqueDatabaseName
used for referencing a Parquet-format database. If a user has access to multiple databases with the samedatabaseName
, the user will have to reference the Parquet-format database byuniqueDatabaseName
uniqueDatabaseName
string The Parquet-format database nametypes
array of strings Types associated with the objectcreated
timestamp Time at which this object was createdstate
string Always "open"hidden
boolean Whether the object is hidden or notlinks
array of strings The object IDs that are pointed to fromthis objectname
string The name of the database data object. Thename
of the object can be different fromdatabaseName
folder
string The full path to the folder containing the objectsponsored
boolean Whether the object is sponsored by DNAnexustags
array of strings Tags associated with the objectmodified
timestamp Time at which the user-provided metadata of the object was last modifiedcreatedBy
mapping How the object was createduser
string ID of the user who created the object or launched an execution which created the objectjob
string present if a job created the object ID of the job that created the objectexecutable
string present if a job created the object ID of the app or applet that the job was running
The following field (included by default) is available if the object is sponsored by a third party:
sponsoredUntil
timestamp Indicates the expiration time of data sponsorship (this field is only set if the object is currently sponsored, and if set, the specified time is always in the future)
The following fields are only returned if the corresponding field in the
fields
input is set to true
:properties
mapping Properties associated with the object- key Property name
- value string Property value
details
mapping or array Contents of the object’s details
- ResourceNotFound
- The specified object does not exist or the specified
project
does not exist
- InvalidInput
- The input is not a hash,
project
(if supplied) is not a string
- PermissionDenied
- VIEW access required for the
project
provided (if any), and VIEW access required for some project containing the specified object (not necessarily the same as the hint provided)
Moves the database data object from the current project to the specified project. You may not relocate a database to another project which already contains a database with the same database name.
project
string ID of the project to which the database should be relocated (i.e. a string in the form "project-xxxx")destination
string (optional, default "/") The destination folder inproject
parents
boolean (optional, default false) Whether the destination folder and/or parent folders should be created if they do not exist
id
string ID of the moved database object (i.e. a string in the form "database-xxxx")project
string ID of the modified destination project
- ResourceNotFound
- The specified database does not exist
- The project specified in
project
does not exist - The folder specified in
destination
does not exist in the destination project andparents
is set to false - The source or destination project is not accessible for specified action due to missing license
- InvalidInput
project
is missing, is not a project ID or is the same as source projectdestination
(if provided) is not a nonempty string starting with "/"parents
(if provided) is not a booleanproject
must be in the same region as the source project- A database with the same
databaseName
already exists in the target project
- PermissionDenied
- CONTRIBUTE/ADMINISTER access is required, depending on PROTECTED flag on the source project
- UPLOAD access is required in the destination project
Last modified 1yr ago