Skip to main content
check_table(table_names=None, options=)[source]

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.

Parameters

table_names (list of str) –

List of tables to query. An asterisk returns all tables. The user can provide a single element (which will be automatically promoted to a list internally) or a list.

options (dict of str to str) –

Optional parameters. Allowed keys are:

  • local_only – If true only locally persisted files will be checked. Allowed values are:

    • true

    • false

    The default value is ‘false’.

  • show_detail – If true reports individual chunk errors. Allowed values are:

    • true

    • false

    The default value is ‘true’.

The default value is an empty dict ( ).

Returns

A dict with the following entries–

table_names (list of str) –

The names of the tables that were checked.

ids (list of str) –

The chunk identifiers associated with each reported result.

locations (list of str) –

The locations (rank/tom) where each chunk corruption was found.

errors (list of str) –

A description of each corruption error detected or count of the errors, based on show_detail.

info (dict of str to str) –

Additional information. The default value is an empty dict ( ).