/check/table

URL: http://<db.host>:<db.port>/check/table

Scans the requested tables as specified in input parameter table_names for integrity. Any table chunks which fail the check will be marked as corrupt. By default the database will automatically repair corrupt tables (via truncating). Note that since this reads every table column from disk it may be a potentially long-running operation. The option local_only can be used to skip any table files already written to a remote storage. Returns table corruption results.

Input Parameter Description

NameTypeDescription
table_namesarray of stringsList of tables to query. An asterisk returns all tables.
optionsmap of string to strings

Optional parameters. The default value is an empty map ( {} ).

Supported Parameters (keys)Parameter Description
local_only

If true only locally persisted files will be checked. The default value is false. The supported values are:

  • true
  • false
show_detail

If true reports individual chunk errors. The default value is true. The supported values are:

  • true
  • false

Output Parameter Description

The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:

NameTypeDescription
statusString'OK' or 'ERROR'
messageStringEmpty if success or an error message
data_typeString'check_table_response' or 'none' in case of an error
dataStringEmpty string
data_strJSON or String

This embedded JSON represents the result of the /check/table endpoint:

NameTypeDescription
table_namesarray of strings 
idsarray of strings 
locationsarray of strings 
errorsarray of strings 
infomap of string to stringsAdditional information. The default value is an empty map ( {} ).

Empty string in case of an error.