Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Addax supports a wide range of database systems and file sources. Below is a sel
</tr>
<tr>
<td><img src="./docs/images/logos/iceberg.svg" height="50px" alt="Iceberg" style="border: 1px solid #add;"></td>
<td><img src="./docs/images/logos/gaussdb.svg" height="50px" alt="GaussDB" style="border: 1px solid #add;"></td>
</tr>
</table>

Expand Down
1 change: 1 addition & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Addax 支持超过 20 种[关系型和非关系型数据库](support_data_source
</tr>
<tr>
<td><img src="./docs/images/logos/iceberg.svg" height="50px" alt="Iceberg" style="border: 1px solid #add;"></td>
<td><img src="./docs/images/logos/gaussdb.svg" height="50px" alt="GaussDB" style="border: 1px solid #add;"></td>
</tr>
</table>

Expand Down
43 changes: 43 additions & 0 deletions core/src/main/job/influxdb2gaussdb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"job": {
"content": {
"reader": {
"name": "influxdbreader",
"parameter": {
"column": [
"*"
],
"connection": {
"endpoint": "http://localhost:8086",
"database": "NOAA_water_database",
"table": "h2o_feet"
},
"username": "influx",
"password": "influx123"
}
},
"writer": {
"name": "gaussdbwriter",
"parameter": {
"username": "wgzhao",
"password": "wgzhao",
"column": [
"*"
],
"connection": {
"table": [
"influx_tbl"
],
"jdbcUrl": "jdbc:gaussdb://localhost:8000/wgzhao"
}
}
}
},
"setting": {
"speed": {
"bytes": -1,
"channel": 1
}
}
}
}
54 changes: 54 additions & 0 deletions core/src/main/job/stream2gaussdb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"job": {
"content": [
{
"writer": {
"name": "gaussdbwriter",
"parameter": {
"column": [
"id","subid","msg"
],
"connection": [
{
"jdbcUrl": "jdbc:gaussdb://127.0.0.1:8000/gstest"
,
"table": [
"addax_tbl"
]
}
],
"username": "gstest",
"password": "gstest",
"writeMode": "update(id, subid)"
}
},
"reader": {
"name": "streamreader",
"parameter": {
"column": [
{
"random": "100,1000",
"type": "long"
},
{
"random": "110,1100",
"type": "long"
},
{
"value": "update",
"type": "string"
}
],
"sliceRecordCount": 1
}
}
}
],
"setting": {
"speed": {
"bytes": -1,
"channel": 1
}
}
}
}
34 changes: 34 additions & 0 deletions docs/assets/jobs/gaussreader.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"job": {
"setting": {
"speed": {
"byte": -1,
"channel": 1
}
},
"content": {
"reader": {
"name": "gaussdbreader",
"parameter": {
"username": "gstest",
"password": "gstest",
"column": [
"*"
],
"connection": {
"table": [
"addax_tbl"
],
"jdbcUrl": "jdbc:gaussdb://127.0.0.1:8000/gstest"
}
}
},
"writer": {
"name": "streamwriter",
"parameter": {
"print": true
}
}
}
}
}
48 changes: 48 additions & 0 deletions docs/assets/jobs/gausswriter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"job": {
"setting": {
"speed": {
"byte": -1,
"channel": 1
}
},
"content": {
"reader": {
"name": "gaussdbreader",
"parameter": {
"username": "gstest",
"password": "gstest",
"column": [
"*"
],
"connection": {
"table": [
"addax_tbl"
],
"jdbcUrl": "jdbc:gaussdb://localhost:8000/gstest"
}
}
},
"writer": {
"name": "gaussdbwriter",
"parameter": {
"column": [
"*"
],
"preSql": [
"truncate table @table"
],
"connection": {
"jdbcUrl": "jdbc:gaussdb://127.0.0.1:8000/gstest",
"table": [
"addax_tbl1"
]
},
"username": "gstest",
"password": "gstest",
"writeMode": "insert"
}
}
}
}
}
47 changes: 47 additions & 0 deletions docs/assets/sql/gaussdb.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
create table if not exists addax_tbl
(
c_bigint bigint,
c_bit bit(3),
c_bool boolean,
c_byte bytea,
c_char char(10),
c_varchar varchar(20),
c_date date,
c_double float8,
c_int integer,
c_json json,
c_number decimal(8, 3),
c_real real,
c_small smallint,
c_text text,
c_ts timestamp,
c_uuid uuid,
c_xml xml,
c_money money,
c_inet inet,
c_cidr cidr,
c_macaddr macaddr
);

insert into addax_tbl
values (999988887777,
b'101',
TRUE,
'\xDEADBEEF',
'hello',
'hello, world',
'2021-01-04',
999888.9972,
9876542,
'{"bar": "baz", "balance": 7.77, "active": false}'::json,
12345.123,
123.123,
126,
'this is a long text ',
'2020-01-04 12:13:14',
'A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11'::uuid,
'<foo>bar</foo>'::xml,
'52093.89'::money,
'192.168.1.1'::inet,
'192.168.1/24'::cidr,
'08002b:010203'::macaddr);
Loading