HG_SHARD_ID_FOR_DISTRIBUTION_KEY¶
Introduction¶
HG_SHARD_ID_FOR_DISTRIBUTION_KEY: Get the shard Id for specified distribution keys.
Synopsis¶
SELECT HG_SHARD_ID_FOR_DISTRIBUTION_KEY ( tablename [, column [...] ] )
Parameters¶
tablename: The table name to calculate the shard Id.
column: One or multiple columns on which calculate the shard Id.
Example¶
Calculates the shard Id on columns ‘ORDERSKEY’ and ‘CUSKEY’ on table ORDERS
CALL HG_SHARD_ID_FOR_DISTRIBUTION_KEY ( ORDERS, 'ORDERSKEY', 'CUSKEY' );