New databases are registered in the system for ingests using the following service:

methodresource name
POST/ingest/database 

The service requires a JSON object of the following schema:

{"database":<string>,
 "num_stripes":<number>,
 "num_sub_stripes":<number>,
 "overlap":<number>,
 "auto_build_secondary_index":<number>,
 "local_load_secondary_index":<number>,
 "auth_key":<string>
}

Whee attributes are all mandatory:

attributedescription
database
The name of the database to be created.
num_stripes
The number of stripes.
num_sub_stripes
The number of sub-stripes.
overlap
The overlap radius.
auto_build_secondary_index

The optional attribute indicates the desired mode for building the director  (also known as the secondary) index of the director tables of a catalog. The default value of the attribute is 1 which would tell the System to build the index automatically. If a value of 0  is passed into the service the index won't be built, and it will be up to a user implementing a workflow to build it using the director index building service.

Catalogs in Qserv may have more than one director table. This option applies to all such tables.

local_load_secondary_index

The optional attribute affects the mode of building the director index. The attribute has numeric values treated as the boolean flag.

Please refer to a reference document for the director index building service for a detailed explanation of this parameter. The parameter is named local  in the index builder documentation.

The default value of the option is 0.

auth_key
An authorization key as it's configured in the Qserv Replication/Ingest system.  

Values of attributes num_stripesnum_sub_stripes and overlap are expected to match the corresponding partitioning parameters used when partitioning all partitioned tables of the new database. Note that the current implementation of the system will not validate contributions to the partitioned tables to enforce this requirement. Only the structural correctness may be checked. It's up to a workflow to ensure the data ingested into tables are correct.

If the operation is successfully finished (see Error reporting in the REST API) a JSON object returned by the service will have the following attribute:

{...
 "database":{...}
}

The database key in that object will report various configuration info on the database. We're not going to discuss this in detail here. 

  • No labels