---
source_url: https://docs.dolphindb.cn/zh/funcs/d/dropDataViewEngine.html
fetched_at: 2026-05-19T09:19:19Z
category: funcs
title: dropDataViewEngine
sha1: e1a90745458c727d6c880471bec6457687ff3d6f
---

# dropDataViewEngine

首发版本：3.00.4

## 语法

`dropDataViewEngine(name)`

## 详情

删除当前 CEP 引擎中指定的 DataView 引擎。

## 参数

**name** 字符串，表示 DataView 引擎的名称。

## 返回值

无。

## 例子

```dolphindb
class MainMonitor:CEPMonitor {
    def MainMonitor(){
    }
    // 删除引擎时自动调用，删除共享流表
    def onunload(){ 
      undef('orderDV', SHARED)
      dropDataViewEngine('orderDV')
    }
	def checkOrders(newOrder)
    // 创建 DataViewEngine, 指定主键为 code 列，统计每个股票的最新的委托信息
    def onload(){
        addEventListener(checkOrders,'Orders',,'all') 
        orderDV = streamTable(array(STRING, 0) as market, array(STRING, 0) as code, array(DOUBLE, 0) as price, array(INT, 0) as qty, array(TIMESTAMP, 0) as updateTime)
        share(orderDV,'orderDV')
        createDataViewEngine('orderDV', objByName('orderDV'), `code, `updateTime)
    }
    // 更新每个股票的最新的委托信息
    def checkOrders(newOrder){
		getDataViewEngine('orderDV').append!(table(newOrder.market as market, newOrder.code as code, newOrder.price as price, newOrder.qty as qty))
    }
}
```

**相关函数**：[createCEPEngine](../c/createCEPEngine.html), [createDataViewEngine](../c/createDataViewEngine.html), [getDataViewEngine](../g/getDataViewEngine.html)
