SYSCS_UTIL.GET_START_KEY

The SYSCS_UTIL.GET_START_KEY system procedure that retrieves retrieves the starting key value, in unencoded format, for a specified HBase region.

Syntax

SYSCS_UTIL.GET_START_KEY( VARCHAR schemaName,
                        VARCHAR tableName,
                        VARCHAR indexName,
                        VARCHAR encodedRegionName)

schemaName

The name of the schema of the table.

tableName

The name of the table.

indexName

NULL or the name of the index.

Specify NULL to indicate that the startKey is the primary key of the base table; specify an index name to indicate that the startKey is an index value.

encodedRegionName

The HBase-encoded name of the region, which you can retrieve using the SYSCS_UTIL.GET_ENCODED_REGION_NAME system procedure.

Usage

Use this procedure to discover the starting key value for an HBase region.

Results

Displays the start key for the region in Splice Machine unencoded format.

Example

The following call returns the start key for an HBase table region:

splice> CALL SYSCS_UTIL.GET_START_KEY('SPLICE', 'myTable', null,  '9d427082bedabb79656369b353e401cc');
START_KEY
--------------------------------------------------
{ 2, NULL }

1 row selected

The following call returns the start key for for the region that stores index myIndex on table myTable:

splice> CALL SYSCS_UTIL.GET_START_KEY('SPLICE', 'myTable', 'myIndex','b35fe82916cdd1d48bb5c43f60a9b8b5');
START_KEY
--------------------------------------------------
{ 1996-04-11, 67310, 45983.16, 0.09 }

1 row selected

See Also