Skip to content

Commit

Permalink
Dev oracle (#1142)
Browse files Browse the repository at this point in the history
任务类型增加对Oracle库的支持。#1062

---------

Co-authored-by: feng.du <[email protected]>
Co-authored-by: jiansheng.xu <[email protected]>
Co-authored-by: xjs1983boy <[email protected]>
  • Loading branch information
4 people authored Jan 26, 2024
1 parent 0b0d081 commit 5d54c0e
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 4 deletions.
5 changes: 5 additions & 0 deletions sql/1.5/1.5_increment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,8 @@ INSERT INTO task_param_template (task_type, task_name, task_version, params, gmt
## 开启spark推测行为,默认false
# spark.speculation=false', now(), now(), 0);

-- 2023-11-22 add by xjs1983boy OracleSQL to dict
insert into dict(dict_code,dict_name,dict_value,dict_desc,type,sort,data_type,depend_name,is_default,gmt_create,gmt_modified,is_deleted)
values('27','OracleSQL','{"actions":["SAVE_TASK","RUN_TASK","STOP_TASK","SUBMIT_TASK","OPERATOR_TASK"],"barItem":["task","dependency","task_params","env_params"],"formField":["datasource"],"renderKind":"editor","dataTypeCodes":[2]}','',30,0,'STRING','',0,'2023-11-06 13:35:00','2023-11-06 13:35:00',0);
COMMIT;
5 changes: 5 additions & 0 deletions sql/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2542,3 +2542,8 @@ INSERT INTO task_param_template (task_type, task_name, task_version, params, gmt
## 开启spark推测行为,默认false
# spark.speculation=false', now(), now(), 0);
COMMIT;

-- 2023-11-22 add by xjs1983boy OracleSQL to dict
insert into dict(dict_code,dict_name,dict_value,dict_desc,type,sort,data_type,depend_name,is_default,gmt_create,gmt_modified,is_deleted)
values('27','OracleSQL','{"actions":["SAVE_TASK","RUN_TASK","STOP_TASK","SUBMIT_TASK","OPERATOR_TASK"],"barItem":["task","dependency","task_params","env_params"],"formField":["datasource"],"renderKind":"editor","dataTypeCodes":[2]}','',30,0,'STRING','',0,'2023-11-06 13:35:00','2023-11-06 13:35:00',0);
COMMIT;
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public enum EScheduleJobType {
MAXCOMPUTE(24, "MaxCompute", EJobType.SQL.getType(), 4, null, EComputeType.BATCH, EJobClientType.DATASOURCE_PLUGIN),
HADOOP_MR(25, "HadoopMR", EJobType.MR.getType(), 16, EComponentType.HDFS, EComputeType.BATCH, EJobClientType.WORKER_PLUGIN),
DATAX(26,"DataX", EJobType.PYTHON.getType(),14, EComponentType.DATAX, EComputeType.BATCH, EJobClientType.WORKER_PLUGIN),

ORACLE_SQL(27, "OracleSQL", EJobType.SQL.getType(), 4, null, EComputeType.BATCH, EJobClientType.DATASOURCE_PLUGIN),
;

private final Integer type;
Expand Down Expand Up @@ -216,4 +218,4 @@ public EComponentType getComponentType() {
public EJobClientType getJobClientType() {
return jobClientType;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ public List<EScheduleJobType> support() {
EScheduleJobType.DORIS_SQL, EScheduleJobType.CLICK_HOUSE_SQL, EScheduleJobType.MYSQL,
EScheduleJobType.GREENPLUM, EScheduleJobType.GAUSS_DB, EScheduleJobType.POSTGRESQL,
EScheduleJobType.SQLSERVER, EScheduleJobType.TIDB, EScheduleJobType.VERTICA,
EScheduleJobType.MAXCOMPUTE);
EScheduleJobType.MAXCOMPUTE,EScheduleJobType.ORACLE_SQL);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>${ojdbc8.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down Expand Up @@ -135,4 +134,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
14 changes: 14 additions & 0 deletions taier-ui/src/components/icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -718,3 +718,17 @@ export const DataxIcon = ({ style }: IConProps) => {
</span>
);
};

export const OracleSQLIcon = ({ style }: IConProps) => {
return (
<span title="Oracle" style={{ fontSize: 0, ...style }}>
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" className="icon" viewBox="0 0 1024 1024">
<path
d="M700.245333 188.245333h-376.32a323.754667 323.754667 0 0 0-0.341333 647.509334h376.661333a323.754667 323.754667 0 0 0 0-647.509334z m-8.234666 533.418667H332.202667a209.706667 209.706667 0 0 1 0-419.328h359.808a209.664 209.664 0 1 1 0 419.328z"
p-id="2568" fill="#d81e06"
>
</path>
</svg>
</span>
);
};
1 change: 1 addition & 0 deletions taier-ui/src/constant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export enum TASK_TYPE_ENUM {
MAX_COMPUTE = 24,
HADOOP_MR = 25,
DATAX,
ORACLE_SQL = 27,
}

/**
Expand Down
3 changes: 3 additions & 0 deletions taier-ui/src/services/taskRenderService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
HiveSQLIcon,
MysqlIcon,
OceanBaseIcon,
OracleSQLIcon,
PostgreSqlIcon,
PythonIcon,
ShellIcon,
Expand Down Expand Up @@ -251,6 +252,8 @@ export default class TaskRenderService extends Component<ITaskRenderState> {
return <DorisIcon />;
case TASK_TYPE_ENUM.MYSQL:
return <MysqlIcon />;
case TASK_TYPE_ENUM.ORACLE_SQL:
return <OracleSQLIcon />;
case TASK_TYPE_ENUM.GREENPLUM:
return <GreenPlumIcon />;
case TASK_TYPE_ENUM.POSTGRE_SQL:
Expand Down

0 comments on commit 5d54c0e

Please sign in to comment.