mindsdb handlers 类型简单说明

mindsdb 按照设计,对于handler 分为了两大类(官方文档的介绍),data handlers 以及ml handlers,但是实际上从github 上的介绍来说还包含一个app handlers ,以下对于几种handler 作一个简单的说明

data handlers

作为数据库与mindsdb 的桥,一般面向的是数据库方面的开发,通过如下模式使用

CREATE DATABASE integration_name
WITH ENGINE = 'postgres', 
PARAMETERS = {
'host': '127.0.0.1',
'user': 'root',
'password': 'password'
};

ml handlers

作为ml 框架与mindsdb 的桥,一般在开发的时候会使用到mindsdb 提供的一些周边框架,通过如下模式使用

CREATE ML_ENGINE [IF NOT EXISTS] ml_engine_name
FROM handler_name
[USING argument_key = argument_value];

app handlers (api handlers)

作为应用与mindsdb 的桥,方便外部应用的数据注册到mindsdb 中作为数据源,比如github等类型的,与data handlers 的使用是一致的

CREATE DATABASE mindsdb_github
WITH ENGINE = 'github',
PARAMETERS = {
  "repository": "mindsdb/mindsdb"
};

说明

以上是对于mindsdb 支持的handlers 的一个简单说明,有利于更好的学习,后边会介绍下实际handlers 的开发

参考资料

https://docs.mindsdb.com/mindsdb-handlers

https://docs.mindsdb.com/mindsdb_sql/sql/create/ml-engine

https://docs.mindsdb.com/contribute/ml-handlers

https://github.com/mindsdb/mindsdb/blob/main/docs/contribute/data-handlers.mdx

https://github.com/mindsdb/mindsdb/blob/main/docs/contribute/app-handlers.mdx

https://github.com/mindsdb/mindsdb/tree/main/mindsdb/integrations/handlers/github_handler

https://github.com/mindsdb/mindsdb/tree/main/mindsdb/integrations/handlers/twitter_handler

https://github.com/mindsdb/mindsdb/tree/main/mindsdb/integrations/handlers/mysql_handler

https://github.com/mindsdb/mindsdb/blob/3d9090acb0b8b3b0e2a96e2c93dad436f5ebef90/mindsdb/integrations/libs/base.py#L123

https://github.com/mindsdb/dataprep_ml

posted on 2025-02-20 08:00  荣锋亮  阅读(40)  评论(0)    收藏  举报

导航