GBase常用sql操作和datax gbase配置参数

jdbcUrl:jdbc:gbase://192.168.x.y:5258/testdb

驱动下载

{

    "user": "root",

    "password": "",

    "address": "jdbc:gbase://192.168.1.xxxx:5258/testdb",

    "database": "testdb",

    "jdbcUrl": "jdbc:gbase://192.168.1.xxxx:5258/testdb",

    "driverClassName": "com.gbase.jdbc.Driver",

    "validationQuery": "select 1",

    "port": 5258

}

查看数据库

show databases;

切换数据库

use test;

查看表

show tables;

查询数据

select from t7;

创建表

CREATE TABLE `log` (

  `id` int(200) NOT NULL COMMENT '数据id',

  `B` varchar(30) DEFAULT NULL ,

  `A` varchar(1024) DEFAULT NULL,

  `TTT` varchar(255) DEFAULT NULL,

  `TEST` varchar(255) DEFAULT NULL,

  `QWQE` varchar(255) DEFAULT NULL,

  PRIMARY KEY (`id`) USING BTREE

)  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='日志';

新增数据

INSERT INTO `log`(  `B`, `A`, `TTT`, `TEST`, `QWQE`)

VALUES ( '1111', '2222', '333', '4444', '5555');

{

    "job": {

        "content": [

            {

                "reader": {

                    "name": "rdbmsreader", 

                    "parameter": {

                        "column": ["a","b","c","d"], 

                        "connection": [

                            {

                                "jdbcUrl": ["jdbc:gbase://192.168.1.xxx:5258/test"], 

                                "table": ["test"]

                            }

                        ], 

                        "password": "xxxx", 

                        "username": "root", 

                        "where": ""

                    }

                }, 

                "writer": {

                    "name": "mysqlwriter", 

                    "parameter": {

                        "column": [

                            "id",

                            "ds",

                            "server",

                            "time"

                        ], 

                        "connection": [

                            {

                                "jdbcUrl": "jdbc:mysql://192.168.x.xxx/xxx?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true",

                                "table": [

                                    "xxxx"

                                ]

                            }

                        ], 

                        "password": "xxxx", 

                        "preSql": [], 

                        "session": [], 

                        "username": "xxxxx", 

                        "writeMode": "update"

                    }

                }

            }

        ], 

        "setting": {

            "speed": {

                "channel": "1"

            }

        }

    }

}

你可能感兴趣的:(数据库,sql,数据库,gbase)