SQLite Reader
SQLite Reader plugin is used to read sqlite files in a specified directory. It inherits from RDBMS Reader.
Example
We create an example file:
bash
$ 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> .qThe following configuration reads this table to terminal:
json
{
"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
}
}
}
}
}Save the above configuration file as job/sqlite2stream.json
Execute Collection Command
Execute the following command for data collection
bash
bin/addax.sh job/sqlite2stream.jsonParameters
This plugin is based on RDBMS Reader, so you can refer to all configuration items of RDBMS Reader.