Files
hudi-service/database/table_data_source.sql
2024-05-16 14:50:59 +08:00

27 lines
2.3 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
CREATE TABLE `data_source`
(
`ds_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '数据源标识,主键自增',
`tenant_id` bigint(20) NOT NULL COMMENT '租户标识,外键关联租户表',
`project_id` bigint(20) NOT NULL COMMENT '项目标识,外键关联项目表',
`group_id` bigint(20) DEFAULT NULL COMMENT '分组标识,主键自增',
`scenario_id` int(11) DEFAULT NULL COMMENT '场景标识0默认 1UDAL实时同步 2oracle实时同步 3teledb实时同步 4telepg实时同步 5udal离线同步 6oracle离线同步 7teledb离线同步 8telepg离线同步 9ftp采集 10kafka采集 11pulsar采集 12api采集',
`ds_name` varchar(255) NOT NULL COMMENT '数据源名称,项目内唯一',
`ds_name_cn` varchar(255) NOT NULL COMMENT '数据源中文名称',
`ds_role` varchar(5) DEFAULT NULL COMMENT '数据源角色类型为src、tgt',
`ds_type` varchar(10) NOT NULL COMMENT '数据源类型类型主要有mysql、oracle、pg、gp、udal、teledb、hdfs、hive、ftp具体参考系统字典类型表ds_type',
`schema_name` varchar(50) NOT NULL COMMENT '数据库名,针对数据库类数据源,其他数据源可不填',
`ds_state` char(1) NOT NULL DEFAULT 'y' COMMENT 'y正常状态n冻结状态',
`connection` text NOT NULL COMMENT '数据源信息标准JSON格式',
`ext_settings` mediumtext COMMENT '数据源扩展设置标准JSON格式',
`remark` varchar(255) DEFAULT NULL COMMENT '备注信息',
`creator_id` bigint(20) NOT NULL COMMENT '创建人标识,外键关联用户表',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifier_id` bigint(20) NOT NULL COMMENT '修改人标识,外键关联用户表',
`modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`record_state` char(1) NOT NULL DEFAULT 'y' COMMENT '记录状态y有效数据 n已删除数据',
PRIMARY KEY (`ds_id`),
UNIQUE KEY `AK_ds_name` (`project_id`, `ds_name`),
KEY `group_id` (`group_id`),
KEY `ds_type` (`ds_type`)
) DEFAULT CHARSET = utf8mb4 COMMENT ='数据源定义,定义数据源名称、类型、连接信息、扩展属性等'