DSID Function

Return the string form of the unique distributed member process identity in the SQLFire cluster.

Description

The DSID function returns the string form of the distributed member process identity uniquely represented in the distributed system. By default, a SELECT query with the DSID function in the SelectExpression filters out secondary buckets of a partitioned table if the table was created with REDUNDANCY. To include the redundant buckets, specify the query hint --sqlfire-properties withSecondaries = true as shown in the example.

Example

-- find out current process distributed member id
VALUES dsid()

-- get members where a partitioned table is defined.
SELECT DISTICT dsid() FROM emp.employee

-- number of rows present on each member of a partitioned table.
SELECT count(emp_id), dsid() FROM course, sys.members GROUP BY dsid()

-- number of rows including secondary copies present on each member of a 
-- partitioned table.
SELECT count(emp_id), dsid() FROM course, sys.members m --sqlfire-properties withSecondaries = true \n GROUP BY dsid()