Access Writer
Access Writer plugin implements the functionality of writing data to Access destination tables.
Example
Assume the Access table to be written has the following DDL statement:
create table tbl_test(name varchar(20), file_size int, file_date date, file_open boolean, memo blob);
Here we use data generated from memory to import into Access.
json
{
"job": {
"setting": {
"speed": {
"channel": 1,
"bytes": -1
}
},
"content": {
"reader": {
"name": "streamreader",
"parameter": {
"column": [
{
"value": "Addax",
"type": "string"
},
{
"value": 19880808,
"type": "long"
},
{
"value": "1988-08-08 08:08:08",
"type": "date"
},
{
"value": true,
"type": "bool"
},
{
"value": "test",
"type": "bytes"
}
],
"sliceRecordCount": 1000
}
},
"writer": {
"name": "accesswriter",
"parameter": {
"username": "wgzhao",
"password": "",
"column": [
"name",
"file_size",
"file_date",
"file_open",
"memo"
],
"ddl": "create table tbl_test(name varchar(20), file_size int, file_date date, file_open boolean, memo blob);",
"connection": {
"jdbcUrl": "jdbc:ucanaccess:////Users/wgzhao/Downloads/AccessThemeDemo.mdb",
"table": [
"tbl_test"
]
}
}
}
}
}
}Save the above configuration file as job/stream2access.json
Execute Collection Command
Execute the following command for data collection
bash
bin/addax.sh job/stream2access.jsonParameters
This plugin is based on RDBMS Writer, so you can refer to all configuration items of RDBMS Writer.
Change Log
- From version
5.0.1, when the Access database file to be written does not exist, it will be automatically created and the database format will be set toAccess 2016