SQLite Reader¶
SQLite Reader 插件用于读取指定目录下的 sqlite 文件, 他继承于 RDBMS Reader
示例¶
我们创建示例文件:
$ sqlite3 /tmp/test.sqlite3
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table test(id int, name varchar(10), salary double);
sqlite> insert into test values(1,'foo', 12.13),(2,'bar',202.22);
sqlite> .q
下面的配置是读取该表到终端的作业:
{
"job": {
"setting": {
"speed": {
"channel": 3
},
"errorLimit": {
"record": 0,
"percentage": 0.02
}
},
"content": {
"reader": {
"name": "sqlitereader",
"parameter": {
"username": "fakeuser",
"password": "",
"column": [
"*"
],
"connection": {
"jdbcUrl": "jdbc:sqlite:/tmp/test.sqlite3",
"table": [
"test"
]
}
}
},
"writer": {
"name": "streamwriter",
"parameter": {
"print": true
}
}
}
}
}
将上述配置文件保存为 job/sqlite2stream.json
执行采集命令¶
执行以下命令进行数据采集
bin/addax.sh job/sqlite2stream.json
参数说明¶
该插件基于 RDBMS Reader 实现,因此可以参考 RDBMS Reader 的所有配置项。