sys.dm_exec_external_work (Transact-SQL)

Applies to: SQL Server 2016 (13.x) and later versions

Returns information about the workload per worker, on each compute node.

Query sys.dm_exec_external_work to identify the work spun up to communicate with the external data source (for example, Hadoop or MongoDB).

Column Name Data Type Description Range
execution_id nvarchar(32) Unique identifier for associated PolyBase query. See request_ID in sys.dm_exec_requests (Transact-SQL).
step_index int The request this worker is performing. See step_index in sys.dm_exec_requests (Transact-SQL).
dms_step_index int Step in the DMS plan that this worker is executing. See sys.dm_exec_dms_workers (Transact-SQL).
compute_node_id int The node the worker is running on. See sys.dm_exec_compute_nodes (Transact-SQL).
type nvarchar(60) The type of external work. 'File Split' (for Hadoop and Azure storage)

'ODBC Data Split' (for other external data sources)
work_id int ID of the actual split. Greater than or equal to 0.
input_name nvarchar(4000) Name of the input to be read File name (with path) when using Hadoop or Azure storage. For other external data sources, it is the concatenation of the external data source location and the external table location: scheme://DataSourceHostname[:port]/[DatabaseName.][SchemaName.]TableName
read_location bigint Offset of read location. 0 to the number of bytes in the file minus 1.

NULL for non-Hadoop or non-Azure storage.
read_command nvarchar(4000) The query that is sent to the external data source. Introduced in SQL Server 2019 (15.x). Text representing the query. For Hadoop and Azure storage returns NULL.
bytes_processed bigint Total bytes allocated for processing data by this worker. This value may not necessarily represent the total data being returned by the query Greater than or equal to 0.
length bigint Length of the split or, HDFS block for Hadoop User-definable. The default is 64M
status nvarchar(32) Status of the worker Pending, Processing, Done, Failed, Aborted
start_time datetime Beginning of the work
end_time datetime End of the work
total_elapsed_time int Total time in milliseconds
compute_pool_id int Unique identifier for the pool where the worker is running. Only applies to SQL Server Big Data Cluster. See sys.dm_exec_compute_pools (Transact-SQL). Returns 0 for SQL Server on Windows and Linux.

Remarks

Starting with SQL Server 2019 (15.x), you can use sys.dm_exec_external_work to view the remote query passed to an external data source in PolyBase pushdown computation. For more information, see How to tell if external pushdown occurred.

See also

PolyBase troubleshooting with dynamic management views
Dynamic Management Views and Functions (Transact-SQL)
Database Related Dynamic Management Views (Transact-SQL)