Unverified Commit eb9992d8 authored by Zzm0809's avatar Zzm0809 Committed by GitHub

[Fix] Fix sql bug and add some document (#2835)

* Optimization The data source directory tree has two scroll bars * [Improvement-2809] Improvement result not scroll (#2819) * improve-result-scroll * Spotless Apply --------- Co-authored-by: 's avatarZzm0809 <Zzm0809@users.noreply.github.com> * Spotless Apply * Spotless Apply * FIX-SQL-BUG * Spotless Apply * FIX-SQL-BUG * Spotless Apply * FIX-SQL-BUG * FIX-SQL-BUG --------- Co-authored-by: 's avatarZzm0809 <Zzm0809@users.noreply.github.com>
parent b73a3960
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* *
*/ */
export const EXTEND_SQL_KEYWORD: string[] = ['CDCSOURCE', 'EXECUTE', 'PRINT']; export const EXTEND_SQL_KEYWORD: string[] = ['CDCSOURCE', 'EXECUTE', 'PRINT', 'CUSTOMJAR'];
export const FLINK_SQL_KEYWORD: string[] = [ export const FLINK_SQL_KEYWORD: string[] = [
'ABS', 'ABS',
......
...@@ -83,7 +83,7 @@ const PermissionsProTable: React.FC = () => { ...@@ -83,7 +83,7 @@ const PermissionsProTable: React.FC = () => {
setRowPermissions((prevState) => ({ setRowPermissions((prevState) => ({
...prevState, ...prevState,
value: record, value: record,
editOpen: false editOpen: true
})); }));
}; };
......
...@@ -18,26 +18,30 @@ ...@@ -18,26 +18,30 @@
*/ */
import CodeEdit from '@/components/CustomEditor/CodeEdit'; import CodeEdit from '@/components/CustomEditor/CodeEdit';
import { JOB_TYPE } from '@/pages/DataStudio/LeftContainer/Project/constants';
import { import {
DOCUMENT_TYPE_ENUMS, VERSIONS, DOCUMENT_FUNCTION_TYPE_ENUMS, DOCUMENT_CATEGORY_ENUMS DOCUMENT_CATEGORY_ENUMS,
DOCUMENT_FUNCTION_TYPE_ENUMS,
DOCUMENT_TYPE_ENUMS,
VERSIONS
} from '@/pages/RegCenter/Document/constans'; } from '@/pages/RegCenter/Document/constans';
import {FORM_LAYOUT_PUBLIC} from '@/services/constants'; import { FORM_LAYOUT_PUBLIC } from '@/services/constants';
import {Document} from '@/types/RegCenter/data'; import { Document } from '@/types/RegCenter/data';
import {l} from '@/utils/intl'; import { l } from '@/utils/intl';
import { import {
ProForm, ProForm,
ProFormItem, ProFormSegmented, ProFormItem,
ProFormSegmented,
ProFormSelect, ProFormSelect,
ProFormSwitch, ProFormSwitch,
ProFormText, ProFormText,
ProFormTextArea ProFormTextArea
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
import {FormInstance} from 'antd/es/form/hooks/useForm'; import { ProFormDependency } from '@ant-design/pro-form';
import {Values} from 'async-validator'; import { FormInstance } from 'antd/es/form/hooks/useForm';
import {DefaultOptionType} from 'rc-select/lib/Select'; import { Values } from 'async-validator';
import React, {useState} from 'react'; import { DefaultOptionType } from 'rc-select/lib/Select';
import {ProFormDependency} from "@ant-design/pro-form"; import React, { useState } from 'react';
import {JOB_TYPE} from "@/pages/DataStudio/LeftContainer/Project/constants";
type DocumentFormProps = { type DocumentFormProps = {
values: Partial<Document>; values: Partial<Document>;
...@@ -50,39 +54,37 @@ const CodeEditProps = { ...@@ -50,39 +54,37 @@ const CodeEditProps = {
}; };
const DocumentForm: React.FC<DocumentFormProps> = (props) => { const DocumentForm: React.FC<DocumentFormProps> = (props) => {
const {values, form} = props; const { values, form } = props;
/** /**
* status * status
*/ */
const [codeFillValue, setCodeFillValue] = useState<string>(values.fillValue || ''); const [codeFillValue, setCodeFillValue] = useState<string>(values.fillValue || '');
const { const { FLINK_OPTIONS, SQL_TEMPLATE, FUN_UDF, OTHER } = DOCUMENT_TYPE_ENUMS;
FLINK_OPTIONS,
SQL_TEMPLATE,
FUN_UDF,
OTHER
} = DOCUMENT_TYPE_ENUMS;
const [CATEGORY_LIST] = useState<DefaultOptionType[]>( const [CATEGORY_LIST] = useState<DefaultOptionType[]>(
Object.values(DOCUMENT_CATEGORY_ENUMS).map((item) => ({label: item.text, value: item.value})) Object.values(DOCUMENT_CATEGORY_ENUMS).map((item) => ({ label: item.text, value: item.value }))
); );
const [FUNCTION_TYPES] = useState<DefaultOptionType[]>( const [FUNCTION_TYPES] = useState<DefaultOptionType[]>(
Object.values(DOCUMENT_FUNCTION_TYPE_ENUMS).map((item) => ({label: item.text, value: item.value})) Object.values(DOCUMENT_FUNCTION_TYPE_ENUMS).map((item) => ({
label: item.text,
value: item.value
}))
); );
const [VERSION_OPTIONS] = useState<DefaultOptionType[]>( const [VERSION_OPTIONS] = useState<DefaultOptionType[]>(
VERSIONS.map((item) => ({label: item.text, value: item.value})) VERSIONS.map((item) => ({ label: item.text, value: item.value }))
); );
const onTypeAndNameChange = (type: string, name: string) => { const onTypeAndNameChange = (type: string, name: string) => {
if (type == FLINK_OPTIONS.value) { if (type == FLINK_OPTIONS.value) {
const fillValue = "set '" + name + "' = '${1:}'"; const fillValue = "set '" + name + "' = '${1:}'";
form.setFieldsValue({category: "Varible"}); form.setFieldsValue({ category: 'Varible' });
form.setFieldsValue({fillValue: fillValue}); form.setFieldsValue({ fillValue: fillValue });
setCodeFillValue(fillValue); setCodeFillValue(fillValue);
} }
} };
/** /**
* form * form
...@@ -94,7 +96,7 @@ const DocumentForm: React.FC<DocumentFormProps> = (props) => { ...@@ -94,7 +96,7 @@ const DocumentForm: React.FC<DocumentFormProps> = (props) => {
<ProFormSegmented <ProFormSegmented
name='type' name='type'
label={l('rc.doc.functionType')} label={l('rc.doc.functionType')}
rules={[{required: true, message: l('rc.doc.typePlaceholder')}]} rules={[{ required: true, message: l('rc.doc.typePlaceholder') }]}
valueEnum={DOCUMENT_TYPE_ENUMS} valueEnum={DOCUMENT_TYPE_ENUMS}
/> />
...@@ -102,39 +104,40 @@ const DocumentForm: React.FC<DocumentFormProps> = (props) => { ...@@ -102,39 +104,40 @@ const DocumentForm: React.FC<DocumentFormProps> = (props) => {
name='name' name='name'
label={l('rc.doc.name')} label={l('rc.doc.name')}
placeholder={l('rc.doc.namePlaceholder')} placeholder={l('rc.doc.namePlaceholder')}
rules={[{required: true, message: l('rc.doc.namePlaceholder')}]} rules={[{ required: true, message: l('rc.doc.namePlaceholder') }]}
/> />
<ProFormDependency name={['type', 'name']}> <ProFormDependency name={['type', 'name']}>
{ {({ type, name }) => {
({type, name}) => { onTypeAndNameChange(type, name);
onTypeAndNameChange(type, name); return (
return <> <>
{type != FLINK_OPTIONS.value && type != OTHER.value && {type != FLINK_OPTIONS.value && type != OTHER.value && (
<ProFormSelect <ProFormSelect
name='subtype' name='subtype'
label={l('rc.doc.subFunctionType')} label={l('rc.doc.subFunctionType')}
rules={[{required: true, message: l('rc.doc.subTypePlaceholder')}]} rules={[{ required: true, message: l('rc.doc.subTypePlaceholder') }]}
options={type == FUN_UDF.value ? FUNCTION_TYPES : JOB_TYPE} options={type == FUN_UDF.value ? FUNCTION_TYPES : JOB_TYPE}
/>} />
)}
<ProFormSelect <ProFormSelect
disabled={type == FLINK_OPTIONS.value} disabled={type == FLINK_OPTIONS.value}
name='category' name='category'
label={l('rc.doc.category')} label={l('rc.doc.category')}
rules={[{required: true, message: l('rc.doc.categoryPlaceholder')}]} rules={[{ required: true, message: l('rc.doc.categoryPlaceholder') }]}
options={CATEGORY_LIST} options={CATEGORY_LIST}
/> />
</> </>
} );
} }}
</ProFormDependency> </ProFormDependency>
<ProFormItem <ProFormItem
name='fillValue' name='fillValue'
label={l('rc.doc.fillValue')} label={l('rc.doc.fillValue')}
tooltip={l('rc.doc.fillValuePlaceholder')} tooltip={l('rc.doc.fillValuePlaceholder')}
rules={[{required: true, message: l('rc.doc.fillValueHelp')}]} rules={[{ required: true, message: l('rc.doc.fillValueHelp') }]}
> >
<CodeEdit <CodeEdit
code={codeFillValue} code={codeFillValue}
...@@ -153,7 +156,7 @@ const DocumentForm: React.FC<DocumentFormProps> = (props) => { ...@@ -153,7 +156,7 @@ const DocumentForm: React.FC<DocumentFormProps> = (props) => {
<ProFormSelect <ProFormSelect
name='version' name='version'
label={l('rc.doc.version')} label={l('rc.doc.version')}
rules={[{required: true, message: l('rc.doc.versionPlaceholder')}]} rules={[{ required: true, message: l('rc.doc.versionPlaceholder') }]}
options={VERSION_OPTIONS} options={VERSION_OPTIONS}
/> />
......
...@@ -27,8 +27,8 @@ import DocumentDrawer from '@/pages/RegCenter/Document/components/DocumentDrawer ...@@ -27,8 +27,8 @@ import DocumentDrawer from '@/pages/RegCenter/Document/components/DocumentDrawer
import DocumentModalForm from '@/pages/RegCenter/Document/components/DocumentModal'; import DocumentModalForm from '@/pages/RegCenter/Document/components/DocumentModal';
import { import {
DOCUMENT_CATEGORY_ENUMS, DOCUMENT_CATEGORY_ENUMS,
DOCUMENT_TYPE_ENUMS, DOCUMENT_FUNCTION_TYPE_ENUMS,
DOCUMENT_FUNCTION_TYPE_ENUMS DOCUMENT_TYPE_ENUMS
} from '@/pages/RegCenter/Document/constans'; } from '@/pages/RegCenter/Document/constans';
import { queryList } from '@/services/api'; import { queryList } from '@/services/api';
import { handleAddOrUpdate, handleRemoveById, updateDataByParam } from '@/services/BusinessCrud'; import { handleAddOrUpdate, handleRemoveById, updateDataByParam } from '@/services/BusinessCrud';
...@@ -113,7 +113,7 @@ const DocumentTableList: React.FC = () => { ...@@ -113,7 +113,7 @@ const DocumentTableList: React.FC = () => {
sorter: true, sorter: true,
dataIndex: 'type', dataIndex: 'type',
filterMultiple: true, filterMultiple: true,
filters:true, filters: true,
valueEnum: DOCUMENT_TYPE_ENUMS valueEnum: DOCUMENT_TYPE_ENUMS
}, },
{ {
......
...@@ -18,45 +18,47 @@ ...@@ -18,45 +18,47 @@
*/ */
export const DOCUMENT_CATEGORY_ENUMS = { export const DOCUMENT_CATEGORY_ENUMS = {
Variable: {text: 'Variable', value: 'Variable'}, Variable: { text: 'Variable', value: 'Variable' },
Module: {text: 'Module', value: 'Module'}, Module: { text: 'Module', value: 'Module' },
Operator: {text: 'Operator', value: 'Operator'}, Operator: { text: 'Operator', value: 'Operator' },
Function: {text: 'Function', value: 'Function'}, Function: { text: 'Function', value: 'Function' },
Property: {text: 'Property', value: 'Property'}, Property: { text: 'Property', value: 'Property' },
Method: {text: 'Method', value: 'Method'}, Method: { text: 'Method', value: 'Method' },
Reference: {text: 'Reference', value: 'Reference'} Reference: { text: 'Reference', value: 'Reference' }
}; };
/** /**
* document function type enum map * document function type enum map
*/ */
export const DOCUMENT_TYPE_ENUMS = { export const DOCUMENT_TYPE_ENUMS = {
SQL_TEMPLATE: {text: '代码片段/模板', value: 'SQL_TEMPLATE'}, SQL_TEMPLATE: { text: '代码片段/模板', value: 'SQL_TEMPLATE' },
FLINK_OPTIONS: {text: 'Flink参数', value: 'FLINK_OPTIONS'}, FLINK_OPTIONS: { text: 'Flink参数', value: 'FLINK_OPTIONS' },
FUN_UDF: {text: '函数/UDF', value: 'FUN_UDF'}, FUN_UDF: { text: '函数/UDF', value: 'FUN_UDF' },
OTHER: {text: '其他', value: 'OTHER'}, OTHER: { text: '其他', value: 'OTHER' }
}; };
export const DOCUMENT_FUNCTION_TYPE_ENUMS = { export const DOCUMENT_FUNCTION_TYPE_ENUMS = {
COMPARE_FUNCTION: {text: '比较函数', value: 'COMPARE_FUNCTION'}, COMPARE_FUNCTION: { text: '比较函数', value: 'COMPARE_FUNCTION' },
LOGICAL_FUNCTION: {text: '逻辑函数', value: 'LOGICAL_FUNCTION'}, LOGICAL_FUNCTION: { text: '逻辑函数', value: 'LOGICAL_FUNCTION' },
ARITHMETIC_FUNCTIONS: {text: '算术函数', value: 'ARITHMETIC_FUNCTIONS'}, ARITHMETIC_FUNCTIONS: { text: '算术函数', value: 'ARITHMETIC_FUNCTIONS' },
STRING_FUNCTIONS: {text: '字符串函数', value: 'STRING_FUNCTIONS'}, STRING_FUNCTIONS: { text: '字符串函数', value: 'STRING_FUNCTIONS' },
TIME_FUNCTION: {text: '时间函数', value: 'TIME_FUNCTION'}, TIME_FUNCTION: { text: '时间函数', value: 'TIME_FUNCTION' },
CONDITIONAL_FUNCTION: {text: '条件函数', value: 'CONDITIONAL_FUNCTION'}, CONDITIONAL_FUNCTION: { text: '条件函数', value: 'CONDITIONAL_FUNCTION' },
TYPE_CONVER_FUNCTION: {text: '类型转换函数功能', value: 'TYPE_CONVER_FUNCTION'}, TYPE_CONVER_FUNCTION: { text: '类型转换函数功能', value: 'TYPE_CONVER_FUNCTION' },
COLLECTION_FUNCTION: {text: 'Collection 函数', value: 'COLLECTION_FUNCTION'}, COLLECTION_FUNCTION: { text: 'Collection 函数', value: 'COLLECTION_FUNCTION' },
VALUE_CONSTRUCTION_FUNCTION: {text: 'Value Construction函数', value: 'VALUE_CONSTRUCTION_FUNCTION Construction函数'}, VALUE_CONSTRUCTION_FUNCTION: {
VALUE_ACCESS_FUNCTION: {text: 'Value Access函数', value: 'VALUE_ACCESS_FUNCTION'}, text: 'Value Construction函数',
GROUP_FUNCTION: {text: '分组函数', value: 'GROUP_FUNCTION'}, value: 'VALUE_CONSTRUCTION_FUNCTION Construction函数'
HASH_FUNCTION: {text: 'hash函数', value: 'HASH_FUNCTION'}, },
AGGREGATE_FUNCTION: {text: '聚合函数', value: 'AGGREGATE_FUNCTION'}, VALUE_ACCESS_FUNCTION: { text: 'Value Access函数', value: 'VALUE_ACCESS_FUNCTION' },
COLUMN_FUNCTION: {text: '列函数', value: 'COLUMN_FUNCTION'}, GROUP_FUNCTION: { text: '分组函数', value: 'GROUP_FUNCTION' },
TABLE_AGGREGATE_FUNCTION: {text: '表值聚合函数', value: 'TABLE_AGGREGATE_FUNCTION'}, HASH_FUNCTION: { text: 'hash函数', value: 'HASH_FUNCTION' },
OTHER_FUNCTION: {text: '其他函数', value: 'OTHER_FUNCTION'}, AGGREGATE_FUNCTION: { text: '聚合函数', value: 'AGGREGATE_FUNCTION' },
COLUMN_FUNCTION: { text: '列函数', value: 'COLUMN_FUNCTION' },
TABLE_AGGREGATE_FUNCTION: { text: '表值聚合函数', value: 'TABLE_AGGREGATE_FUNCTION' },
OTHER_FUNCTION: { text: '其他函数', value: 'OTHER_FUNCTION' }
}; };
/** /**
* versions select options * versions select options
*/ */
......
...@@ -45,6 +45,7 @@ import { l } from '@/utils/intl'; ...@@ -45,6 +45,7 @@ import { l } from '@/utils/intl';
import { Monaco } from '@monaco-editor/react'; import { Monaco } from '@monaco-editor/react';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import cookies from 'js-cookie'; import cookies from 'js-cookie';
import { trim } from 'lodash';
import { editor, KeyCode, KeyMod } from 'monaco-editor'; import { editor, KeyCode, KeyMod } from 'monaco-editor';
import path from 'path'; import path from 'path';
import { format } from 'sql-formatter'; import { format } from 'sql-formatter';
......
...@@ -1098,7 +1098,7 @@ ORDER BY order_time ...@@ -1098,7 +1098,7 @@ ORDER BY order_time
RANGE BETWEEN INTERVAL \'1\' MINUTE PRECEDING AND CURRENT ROW RANGE BETWEEN INTERVAL \'1\' MINUTE PRECEDING AND CURRENT ROW
) as one_minute_sum ) as one_minute_sum
FROM source_table3;', 'All Versions', 0, 1, '2023-11-15 15:42:16', '2023-12-28 00:02:57', null, null); FROM source_table3;', 'All Versions', 0, 1, '2023-11-15 15:42:16', '2023-12-28 00:02:57', null, null);
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (245, 'Property', 'FLINK_OPTIONS', '', 'checkpoint config', 'checkpoint config', '-- 声明一些调优参数 (checkpoint 等相关配置) INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (245, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'checkpoint config', 'checkpoint config', '-- 声明一些调优参数 (checkpoint 等相关配置)
set \'execution.checkpointing.checkpoints-after-tasks-finish.enabled\' =\'true\'; set \'execution.checkpointing.checkpoints-after-tasks-finish.enabled\' =\'true\';
SET \'pipeline.operator-chaining\' = \'false\'; SET \'pipeline.operator-chaining\' = \'false\';
set \'state.savepoints.dir\'=\'file:///opt/data/flink_cluster/savepoints\'; -- 目录自行修改 set \'state.savepoints.dir\'=\'file:///opt/data/flink_cluster/savepoints\'; -- 目录自行修改
...@@ -1108,7 +1108,37 @@ set \'state.backend.type\'=\'rocksdb\'; ...@@ -1108,7 +1108,37 @@ set \'state.backend.type\'=\'rocksdb\';
set \'execution.checkpointing.interval\'=\'60 s\'; set \'execution.checkpointing.interval\'=\'60 s\';
set \'state.checkpoints.num-retained\'=\'100\'; set \'state.checkpoints.num-retained\'=\'100\';
-- 使 solt 均匀分布在 各个 TM 上 -- 使 solt 均匀分布在 各个 TM 上
set \'cluster.evenly-spread-out-slots\'=\'true\';', 'All Versions', 0, 1, '2023-11-15 15:57:42', '2023-12-27 23:58:09', null, null); set \'cluster.evenly-spread-out-slots\'=\'true\';', 'All Versions', 0, 1, '2023-11-15 15:57:42', '2023-12-28 15:49:20', null, null);
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (246, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'note template', 'note template', '-- -----------------------------------------------------------------
-- @Description(作业描述): ${1:}
-- @Creator(创建人): ${2:}
-- @Create DateTime(创建时间): ${3:}
-- -----------------------------------------------------------------
${4:}', 'All Versions', 0, 1, '2023-11-17 17:03:24', '2023-12-28 12:05:20', 1, 1);
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (247, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'dinky_paimon_auto_create_table', 'dinky paimon auto create table', '-- -----------------------------------------------------------------
-- 该 demo 用于创建 mysql-cdc 到 paimon 的整库同步案例 并使用自动建表,注意 #{schemaName} 和 #{tableName} 为固定写法,不要修改,用于动态获取库名和表名
-- -----------------------------------------------------------------
EXECUTE CDCSOURCE dinky_paimon_auto_create_table
WITH
(
\'connector\' = \'mysql-cdc\',
\'hostname\' = \'\',
\'port\' = \'\',
\'username\' = \'\',
\'password\' = \'\',
\'checkpoint\' = \'10000\',
\'parallelism\' = \'1\',
\'scan.startup.mode\' = \'initial\',
\'database-name\' = \'dinky\',
\'sink.connector\' = \'paimon\',
\'sink.path\' = \'hdfs:/tmp/paimon/#{schemaName}.db/#{tableName}\',
\'sink.auto-create\' = \'true\',
);', 'All Versions', 0, 1, '2023-12-27 16:53:37', '2023-12-28 12:05:20', 1, 1);
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (248, 'Reference', 'FUN_UDF', 'OTHER_FUNCTION', 'add-customjar', 'add CUSTOMJAR 为 Dinky 扩展语法 功能实现和 add jar 类似 , 推荐使用此方式', '-- add CUSTOMJAR 为 Dinky 扩展语法 功能实现和 add jar 类似 , 推荐使用此方式
add CUSTOMJAR \'${1:}\';', 'All Versions', 0, 1, '2023-12-28 10:50:17', '2023-12-28 15:49:40', 1, 1);
commit ; commit ;
-- ---------------------------- -- ----------------------------
...@@ -1385,11 +1415,11 @@ CREATE TABLE `dinky_udf_template` ( ...@@ -1385,11 +1415,11 @@ CREATE TABLE `dinky_udf_template` (
-- ---------------------------- -- ----------------------------
-- Records of dinky_udf_template -- Records of dinky_udf_template
-- ---------------------------- -- ----------------------------
INSERT INTO `dinky_udf_template` VALUES (1, 'java_udf', 'Java', 'UDF', '${(package==\'\')?string(\'\',\'package \'+package+\';\')}\n\nimport org.apache.flink.table.functions.ScalarFunction;\n\npublic class ${className} extends ScalarFunction {\n public String eval(String s) {\n return null;\n }\n}', true, '2022-10-19 09:17:37', '2022-10-25 17:45:57' ,null,null); INSERT INTO `dinky_udf_template` VALUES (1, 'java_udf', 'Java', 'UDF', '${(package=='''')?string('''',''package ''+package+'';'')}\n\nimport org.apache.flink.table.functions.ScalarFunction;\n\npublic class ${className} extends ScalarFunction {\n public String eval(String s) {\n return null;\n }\n}', true, '2022-10-19 09:17:37', '2022-10-25 17:45:57' ,null,null);
INSERT INTO `dinky_udf_template` VALUES (2, 'java_udtf', 'Java', 'UDTF', '${(package==\'\')?string(\'\',\'package \'+package+\';\')}\n\nimport org.apache.flink.table.functions.ScalarFunction;\n\n@FunctionHint(output = @DataTypeHint(\"ROW<word STRING, length INT>\"))\npublic static class ${className} extends TableFunction<Row> {\n\n public void eval(String str) {\n for (String s : str.split(\" \")) {\n // use collect(...) to emit a row\n collect(Row.of(s, s.length()));\n }\n }\n}', true, '2022-10-19 09:22:58', '2022-10-25 17:49:30' ,null,null); INSERT INTO `dinky_udf_template` VALUES (2, 'java_udtf', 'Java', 'UDTF', '${(package=='''')?string('''',''package ''+package+'';'')}\n\nimport org.apache.flink.table.functions.ScalarFunction;\n\n@FunctionHint(output = @DataTypeHint(\"ROW<word STRING, length INT>\"))\npublic static class ${className} extends TableFunction<Row> {\n\n public void eval(String str) {\n for (String s : str.split(\" \")) {\n // use collect(...) to emit a row\n collect(Row.of(s, s.length()));\n }\n }\n}', true, '2022-10-19 09:22:58', '2022-10-25 17:49:30' ,null,null);
INSERT INTO `dinky_udf_template` VALUES (3, 'scala_udf', 'Scala', 'UDF', '${(package==\'\')?string(\'\',\'package \'+package+\';\')}\n\nimport org.apache.flink.table.api._\nimport org.apache.flink.table.functions.ScalarFunction\n\n// 定义可参数化的函数逻辑\nclass ${className} extends ScalarFunction {\n def eval(s: String, begin: Integer, end: Integer): String = {\n \"this is scala\"\n }\n}', true, '2022-10-25 09:21:32', '2022-10-25 17:49:46' ,null,null); INSERT INTO `dinky_udf_template` VALUES (3, 'scala_udf', 'Scala', 'UDF', '${(package=='''')?string('''',''package ''+package+'';'')}\n\nimport org.apache.flink.table.api._\nimport org.apache.flink.table.functions.ScalarFunction\n\n// 定义可参数化的函数逻辑\nclass ${className} extends ScalarFunction {\n def eval(s: String, begin: Integer, end: Integer): String = {\n \"this is scala\"\n }\n}', true, '2022-10-25 09:21:32', '2022-10-25 17:49:46' ,null,null);
INSERT INTO `dinky_udf_template` VALUES (4, 'python_udf_1', 'Python', 'UDF', 'from pyflink.table import ScalarFunction, DataTypes\nfrom pyflink.table.udf import udf\n\nclass ${className}(ScalarFunction):\n def __init__(self):\n pass\n\n def eval(self, variable):\n return str(variable)\n\n\n${attr!\'f\'} = udf(${className}(), result_type=DataTypes.STRING())', true, '2022-10-25 09:23:07', '2022-10-25 09:34:01' ,null,null); INSERT INTO `dinky_udf_template` VALUES (4, 'python_udf_1', 'Python', 'UDF', 'from pyflink.table import ScalarFunction, DataTypes\nfrom pyflink.table.udf import udf\n\nclass ${className}(ScalarFunction):\n def __init__(self):\n pass\n\n def eval(self, variable):\n return str(variable)\n\n\n${attr!''f''} = udf(${className}(), result_type=DataTypes.STRING())', true, '2022-10-25 09:23:07', '2022-10-25 09:34:01' ,null,null);
INSERT INTO `dinky_udf_template` VALUES (5, 'python_udf_2', 'Python', 'UDF', 'from pyflink.table import DataTypes\nfrom pyflink.table.udf import udf\n\n@udf(result_type=DataTypes.STRING())\ndef ${className}(variable1:str):\n return \'\'', true, '2022-10-25 09:25:13', '2022-10-25 09:34:47' ,null,null); INSERT INTO `dinky_udf_template` VALUES (5, 'python_udf_2', 'Python', 'UDF', 'from pyflink.table import DataTypes\nfrom pyflink.table.udf import udf\n\n@udf(result_type=DataTypes.STRING())\ndef ${className}(variable1:str):\n return ''\'', true, '2022-10-25 09:25:13', '2022-10-25 09:34:47' ,null,null);
-- ---------------------------- -- ----------------------------
...@@ -1791,7 +1821,6 @@ INSERT INTO `dinky_sys_menu` VALUES (40, 5, '保存点', '/datastudio/right/save ...@@ -1791,7 +1821,6 @@ INSERT INTO `dinky_sys_menu` VALUES (40, 5, '保存点', '/datastudio/right/save
INSERT INTO `dinky_sys_menu` VALUES (41, 5, '作业信息', '/datastudio/right/jobInfo', null, 'datastudio:right:jobInfo', 'InfoCircleOutlined', 'F', 0, 8, '2023-09-01 18:04:31', '2023-09-25 18:26:45', null); INSERT INTO `dinky_sys_menu` VALUES (41, 5, '作业信息', '/datastudio/right/jobInfo', null, 'datastudio:right:jobInfo', 'InfoCircleOutlined', 'F', 0, 8, '2023-09-01 18:04:31', '2023-09-25 18:26:45', null);
INSERT INTO `dinky_sys_menu` VALUES (42, 5, '控制台', '/datastudio/bottom/console', null, 'datastudio:bottom:console', 'ConsoleSqlOutlined', 'F', 0, 12, '2023-09-01 18:04:56', '2023-09-26 14:51:24', null); INSERT INTO `dinky_sys_menu` VALUES (42, 5, '控制台', '/datastudio/bottom/console', null, 'datastudio:bottom:console', 'ConsoleSqlOutlined', 'F', 0, 12, '2023-09-01 18:04:56', '2023-09-26 14:51:24', null);
INSERT INTO `dinky_sys_menu` VALUES (43, 5, '结果', '/datastudio/bottom/result', null, 'datastudio:bottom:result', 'SearchOutlined', 'F', 0, 13, '2023-09-01 18:05:16', '2023-09-26 14:51:36', null); INSERT INTO `dinky_sys_menu` VALUES (43, 5, '结果', '/datastudio/bottom/result', null, 'datastudio:bottom:result', 'SearchOutlined', 'F', 0, 13, '2023-09-01 18:05:16', '2023-09-26 14:51:36', null);
INSERT INTO `dinky_sys_menu` VALUES (44, 5, 'BI', '/datastudio/bottom/bi', null, 'datastudio:bottom:bi', 'DashboardOutlined', 'F', 0, 14, '2023-09-01 18:05:43', '2023-09-26 14:51:45', null);
INSERT INTO `dinky_sys_menu` VALUES (45, 5, '血缘', '/datastudio/bottom/lineage', null, 'datastudio:bottom:lineage', 'PushpinOutlined', 'F', 0, 15, '2023-09-01 18:07:15', '2023-09-26 14:52:00', null); INSERT INTO `dinky_sys_menu` VALUES (45, 5, '血缘', '/datastudio/bottom/lineage', null, 'datastudio:bottom:lineage', 'PushpinOutlined', 'F', 0, 15, '2023-09-01 18:07:15', '2023-09-26 14:52:00', null);
INSERT INTO `dinky_sys_menu` VALUES (46, 5, '表数据监控', '/datastudio/bottom/process', null, 'datastudio:bottom:process', 'TableOutlined', 'F', 0, 16, '2023-09-01 18:07:55', '2023-09-26 14:52:38', null); INSERT INTO `dinky_sys_menu` VALUES (46, 5, '表数据监控', '/datastudio/bottom/process', null, 'datastudio:bottom:process', 'TableOutlined', 'F', 0, 16, '2023-09-01 18:07:55', '2023-09-26 14:52:38', null);
INSERT INTO `dinky_sys_menu` VALUES (47, 5, '小工具', '/datastudio/bottom/tool', null, 'datastudio:bottom:tool', 'ToolOutlined', 'F', 0, 17, '2023-09-01 18:08:18', '2023-09-26 14:53:04', null); INSERT INTO `dinky_sys_menu` VALUES (47, 5, '小工具', '/datastudio/bottom/tool', null, 'datastudio:bottom:tool', 'ToolOutlined', 'F', 0, 17, '2023-09-01 18:08:18', '2023-09-26 14:53:04', null);
...@@ -1957,15 +1986,15 @@ INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_c ...@@ -1957,15 +1986,15 @@ INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_c
INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (6, 'alert.rule.checkpointFail', '[{"ruleKey":"isCheckpointFailed","ruleOperator":"EQ","ruleValue":"true"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null); INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (6, 'alert.rule.checkpointFail', '[{"ruleKey":"isCheckpointFailed","ruleOperator":"EQ","ruleValue":"true"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null);
INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (7, 'alert.rule.jobRunException', '[{"ruleKey":"isException","ruleOperator":"EQ","ruleValue":"true"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null); INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (7, 'alert.rule.jobRunException', '[{"ruleKey":"isException","ruleOperator":"EQ","ruleValue":"true"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null);
INSERT INTO dinky_alert_template VALUES (1, 'Default', ' INSERT INTO dinky_alert_template (id, name, template_content, enabled, create_time, update_time, creator, updater) VALUES (1, 'Default', '
- **Job Name :** <font color=''gray''>${jobName}</font> - **Job Name :** <font color=\'gray\'>${jobName}</font>
- **Job Status :** <font color=''red''>${jobStatus}</font> - **Job Status :** <font color=\'red\'>${jobStatus}</font>
- **Alert Time :** ${alertTime} - **Alert Time :** ${alertTime}
- **Start Time :** ${jobStartTime} - **Start Time :** ${jobStartTime}
- **End Time :** ${jobEndTime} - **End Time :** ${jobEndTime}
- **<font color=''red''>${errorMsg}</font>** - **<font color=\'red\'>${errorMsg}</font>**
[Go toTask Web](http://${taskUrl}) [Go toTask Web](http://${taskUrl})
', 1, current_timestamp(), current_timestamp(),null,null); ', 1, '2023-11-24 20:41:23', '2023-11-24 20:41:23', null, null);
commit; commit;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -23,7 +23,7 @@ delete from `dinky_task_statement` where id in (select id from `dinky_task` wher ...@@ -23,7 +23,7 @@ delete from `dinky_task_statement` where id in (select id from `dinky_task` wher
delete from `dinky_task` where `name` = 'dlink_default_catalog'; delete from `dinky_task` where `name` = 'dlink_default_catalog';
update dinky_udf_template set template_code= 'from pyflink.table import DataTypes\nfrom pyflink.table.udf import udf\n\n\n@udf(result_type=DataTypes.STRING())\ndef ${className}(variable1:str):\n return \'\'' where id = 5; update dinky_udf_template set template_code= 'from pyflink.table import DataTypes\nfrom pyflink.table.udf import udf\n\n\n@udf(result_type=DataTypes.STRING())\ndef ${className}(variable1:str):\n return ''\'' where id = 5;
-- update flinkClusterConfiguration -- update flinkClusterConfiguration
SET @userJarPath = ( SELECT VALUE FROM dinky_sys_config WHERE `name` = 'sqlSubmitJarPath' LIMIT 1 ); SET @userJarPath = ( SELECT VALUE FROM dinky_sys_config WHERE `name` = 'sqlSubmitJarPath' LIMIT 1 );
...@@ -109,7 +109,6 @@ INSERT INTO `dinky_sys_menu` VALUES (40, 5, '保存点', '/datastudio/right/save ...@@ -109,7 +109,6 @@ INSERT INTO `dinky_sys_menu` VALUES (40, 5, '保存点', '/datastudio/right/save
INSERT INTO `dinky_sys_menu` VALUES (41, 5, '作业信息', '/datastudio/right/jobInfo', null, 'datastudio:right:jobInfo', 'InfoCircleOutlined', 'F', 0, 8, '2023-09-01 18:04:31', '2023-09-25 18:26:45', null); INSERT INTO `dinky_sys_menu` VALUES (41, 5, '作业信息', '/datastudio/right/jobInfo', null, 'datastudio:right:jobInfo', 'InfoCircleOutlined', 'F', 0, 8, '2023-09-01 18:04:31', '2023-09-25 18:26:45', null);
INSERT INTO `dinky_sys_menu` VALUES (42, 5, '控制台', '/datastudio/bottom/console', null, 'datastudio:bottom:console', 'ConsoleSqlOutlined', 'F', 0, 12, '2023-09-01 18:04:56', '2023-09-26 14:51:24', null); INSERT INTO `dinky_sys_menu` VALUES (42, 5, '控制台', '/datastudio/bottom/console', null, 'datastudio:bottom:console', 'ConsoleSqlOutlined', 'F', 0, 12, '2023-09-01 18:04:56', '2023-09-26 14:51:24', null);
INSERT INTO `dinky_sys_menu` VALUES (43, 5, '结果', '/datastudio/bottom/result', null, 'datastudio:bottom:result', 'SearchOutlined', 'F', 0, 13, '2023-09-01 18:05:16', '2023-09-26 14:51:36', null); INSERT INTO `dinky_sys_menu` VALUES (43, 5, '结果', '/datastudio/bottom/result', null, 'datastudio:bottom:result', 'SearchOutlined', 'F', 0, 13, '2023-09-01 18:05:16', '2023-09-26 14:51:36', null);
INSERT INTO `dinky_sys_menu` VALUES (44, 5, 'BI', '/datastudio/bottom/bi', null, 'datastudio:bottom:bi', 'DashboardOutlined', 'F', 0, 14, '2023-09-01 18:05:43', '2023-09-26 14:51:45', null);
INSERT INTO `dinky_sys_menu` VALUES (45, 5, '血缘', '/datastudio/bottom/lineage', null, 'datastudio:bottom:lineage', 'PushpinOutlined', 'F', 0, 15, '2023-09-01 18:07:15', '2023-09-26 14:52:00', null); INSERT INTO `dinky_sys_menu` VALUES (45, 5, '血缘', '/datastudio/bottom/lineage', null, 'datastudio:bottom:lineage', 'PushpinOutlined', 'F', 0, 15, '2023-09-01 18:07:15', '2023-09-26 14:52:00', null);
INSERT INTO `dinky_sys_menu` VALUES (46, 5, '表数据监控', '/datastudio/bottom/process', null, 'datastudio:bottom:process', 'TableOutlined', 'F', 0, 16, '2023-09-01 18:07:55', '2023-09-26 14:52:38', null); INSERT INTO `dinky_sys_menu` VALUES (46, 5, '表数据监控', '/datastudio/bottom/process', null, 'datastudio:bottom:process', 'TableOutlined', 'F', 0, 16, '2023-09-01 18:07:55', '2023-09-26 14:52:38', null);
INSERT INTO `dinky_sys_menu` VALUES (47, 5, '小工具', '/datastudio/bottom/tool', null, 'datastudio:bottom:tool', 'ToolOutlined', 'F', 0, 17, '2023-09-01 18:08:18', '2023-09-26 14:53:04', null); INSERT INTO `dinky_sys_menu` VALUES (47, 5, '小工具', '/datastudio/bottom/tool', null, 'datastudio:bottom:tool', 'ToolOutlined', 'F', 0, 17, '2023-09-01 18:08:18', '2023-09-26 14:53:04', null);
...@@ -214,20 +213,20 @@ INSERT INTO `dinky_sys_menu` VALUES (146, 10, ' 拷贝', '/registration/datasour ...@@ -214,20 +213,20 @@ INSERT INTO `dinky_sys_menu` VALUES (146, 10, ' 拷贝', '/registration/datasour
-- Records of dinky_alert_rule -- Records of dinky_alert_rule
-- ---------------------------- -- ----------------------------
INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (3, 'alert.rule.jobFail', '[{"ruleKey":"jobStatus","ruleOperator":"EQ","ruleValue":"\'FAILED\'","rulePriority":"1"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null); INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (3, 'alert.rule.jobFail', '[{"ruleKey":"jobStatus","ruleOperator":"EQ","ruleValue":"''FAILED''","rulePriority":"1"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null);
INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (4, 'alert.rule.getJobInfoFail', '[{"ruleKey":"jobStatus","ruleOperator":"EQ","ruleValue":"\'UNKNOWN\'","rulePriority":"1"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null); INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (4, 'alert.rule.getJobInfoFail', '[{"ruleKey":"jobStatus","ruleOperator":"EQ","ruleValue":"''UNKNOWN''","rulePriority":"1"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null);
INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (5, 'alert.rule.jobRestart', '[{"ruleKey":"jobStatus","ruleOperator":"EQ","ruleValue":"\'RESTARTING\'","rulePriority":"1"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null); INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (5, 'alert.rule.jobRestart', '[{"ruleKey":"jobStatus","ruleOperator":"EQ","ruleValue":"''RESTARTING''","rulePriority":"1"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null);
INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (6, 'alert.rule.checkpointFail', '[{"ruleKey":"isCheckpointFailed","ruleOperator":"EQ","ruleValue":"true"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null); INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (6, 'alert.rule.checkpointFail', '[{"ruleKey":"isCheckpointFailed","ruleOperator":"EQ","ruleValue":"true"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null);
INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (7, 'alert.rule.jobRunException', '[{"ruleKey":"isException","ruleOperator":"EQ","ruleValue":"true"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null); INSERT INTO dinky_alert_rules (id, name, rule, template_id, rule_type, trigger_conditions, description, enabled, create_time, update_time, creator, updater) VALUES (7, 'alert.rule.jobRunException', '[{"ruleKey":"isException","ruleOperator":"EQ","ruleValue":"true"}]', 1, 'SYSTEM', ' or ', '', 1, '1970-01-01 00:00:00', '2023-11-22 17:03:44', null, null);
INSERT INTO dinky_alert_template (id, name, template_content, enabled, create_time, update_time, creator, updater) VALUES (1, 'Default', ' INSERT INTO dinky_alert_template (id, name, template_content, enabled, create_time, update_time, creator, updater) VALUES (1, 'Default', '
- **Job Name :** <font color=\'gray\'>${jobName}</font> - **Job Name :** <font color=''gray''>${jobName}</font>
- **Job Status :** <font color=\'red\'>${jobStatus}</font> - **Job Status :** <font color=''red''>${jobStatus}</font>
- **Alert Time :** ${alertTime} - **Alert Time :** ${alertTime}
- **Start Time :** ${jobStartTime} - **Start Time :** ${jobStartTime}
- **End Time :** ${jobEndTime} - **End Time :** ${jobEndTime}
- **<font color=\'red\'>${errorMsg}</font>** - **<font color=''red''>${errorMsg}</font>**
[Go toTask Web](http://${taskUrl}) [Go toTask Web](http://${taskUrl})
', 1, '2023-11-20 17:45:48', '2023-11-23 00:14:22', null, 1); ', 1, '2023-11-20 17:45:48', '2023-11-23 00:14:22', null, 1);
...@@ -287,437 +286,408 @@ UPDATE dinky_history SET config_json=JSON_REMOVE(config_json, '$.jarId'); ...@@ -287,437 +286,408 @@ UPDATE dinky_history SET config_json=JSON_REMOVE(config_json, '$.jarId');
UPDATE dinky_history SET config_json=JSON_REMOVE(config_json, '$.jarTask'); UPDATE dinky_history SET config_json=JSON_REMOVE(config_json, '$.jarTask');
UPDATE dinky_history SET config_json=JSON_REMOVE(config_json, '$.session'); UPDATE dinky_history SET config_json=JSON_REMOVE(config_json, '$.session');
alter table dinky_history add batch_model boolean default false null after job_manager_address; alter table dinky_history add batch_model boolean default false null after job_manager_address;
insert into `dinky_flink_document`
(id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (218, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE print', 'Whole library synchronization print', 'EXECUTE CDCSOURCE demo_print WITH (
values (218, 'Reference', '建表语句', 'Streaming', 'EXECUTE CDCSOURCE print', 'Whole library synchronization print', 'EXECUTE CDCSOURCE demo_print WITH ( \'connector\' = \'mysql-cdc\',
''connector'' = ''mysql-cdc'', \'hostname\' = \'127.0.0.1\',
''hostname'' = ''127.0.0.1'', \'port\' = \'3306\',
''port'' = ''3306'', \'username\' = \'root\',
''username'' = ''root'', \'password\' = \'123456\',
''password'' = ''123456'', \'checkpoint\' = \'10000\',
''checkpoint'' = ''10000'', \'scan.startup.mode\' = \'initial\',
''scan.startup.mode'' = ''initial'', \'parallelism\' = \'1\',
''parallelism'' = ''1'', \'table-name\' = \'test\\.student,test\\.score\',
''table-name'' = ''test\\.student,test\\.score'', \'sink.connector\' = \'print\'
''sink.connector'' = ''print'' );', 'All Versions', 0, 1, '2023-10-31 16:01:45', '2023-12-28 00:02:57', null, null);
);', 'All Versions', 0, 1, '2023-10-31 16:01:45', '2023-10-31 16:02:56'); INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (219, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE doris', 'Whole library synchronization doris', 'EXECUTE CDCSOURCE demo_print WITH (
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'connector\' = \'mysql-cdc\',
values (219, 'Reference', '建表语句', 'Streaming', 'EXECUTE CDCSOURCE doris', 'Whole library synchronization doris', 'EXECUTE CDCSOURCE demo_print WITH ( \'hostname\' = \'127.0.0.1\',
''connector'' = ''mysql-cdc'', \'port\' = \'3306\',
''hostname'' = ''127.0.0.1'', \'username\' = \'root\',
''port'' = ''3306'', \'password\' = \'123456\',
''username'' = ''root'', \'checkpoint\' = \'10000\',
''password'' = ''123456'', \'scan.startup.mode\' = \'initial\',
''checkpoint'' = ''10000'', \'parallelism\' = \'1\',
''scan.startup.mode'' = ''initial'', \'table-name\' = \'test\\.student,test\\.score\',
''parallelism'' = ''1'', \'sink.connector\' = \'print\'
''table-name'' = ''test\\.student,test\\.score'', );', 'All Versions', 0, 1, '2023-10-31 16:02:21', '2023-12-28 00:02:57', null, null);
''sink.connector'' = ''print'' INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (220, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE demo_doris_schema_evolution', 'The entire library is synchronized to doris tape mode evolution', 'EXECUTE CDCSOURCE demo_doris_schema_evolution WITH (
);', 'All Versions', 0, 1, '2023-10-31 16:02:21', '2023-10-31 16:03:09'); \'connector\' = \'mysql-cdc\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'hostname\' = \'127.0.0.1\',
values (220, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE demo_doris_schema_evolution', 'The entire library is synchronized to doris tape mode evolution', 'EXECUTE CDCSOURCE demo_doris_schema_evolution WITH ( \'port\' = \'3306\',
''connector'' = ''mysql-cdc'', \'username\' = \'root\',
''hostname'' = ''127.0.0.1'', \'password\' = \'123456\',
''port'' = ''3306'', \'checkpoint\' = \'10000\',
''username'' = ''root'', \'scan.startup.mode\' = \'initial\',
''password'' = ''123456'', \'parallelism\' = \'1\',
''checkpoint'' = ''10000'', \'table-name\' = \'test\\.student,test\\.score\',
''scan.startup.mode'' = ''initial'', \'sink.connector\' = \'datastream-doris-schema-evolution\',
''parallelism'' = ''1'', \'sink.fenodes\' = \'127.0.0.1:8030\',
''table-name'' = ''test\\.student,test\\.score'', \'sink.username\' = \'root\',
''sink.connector'' = ''datastream-doris-schema-evolution'', \'sink.password\' = \'123456\',
''sink.fenodes'' = ''127.0.0.1:8030'', \'sink.doris.batch.size\' = \'1000\',
''sink.username'' = ''root'', \'sink.sink.max-retries\' = \'1\',
''sink.password'' = ''123456'', \'sink.sink.batch.interval\' = \'60000\',
''sink.doris.batch.size'' = ''1000'', \'sink.sink.db\' = \'test\',
''sink.sink.max-retries'' = ''1'', \'sink.table.identifier\' = \'${schemaName}.${tableName}\'
''sink.sink.batch.interval'' = ''60000'', );', 'All Versions', 0, 1, '2023-10-31 16:04:53', '2023-12-28 00:02:57', null, null);
''sink.sink.db'' = ''test'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (221, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE StarRocks ', 'The entire library is synchronized to StarRocks
''sink.table.identifier'' = ''${schemaName}.${tableName}''
);', 'All Versions', 0, 1, '2023-10-31 16:04:53', '2023-10-31 16:04:53');
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time)
values (221, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE StarRocks ', 'The entire library is synchronized to StarRocks
', 'EXECUTE CDCSOURCE demo_hudi WITH ( ', 'EXECUTE CDCSOURCE demo_hudi WITH (
''connector'' = ''mysql-cdc'', \'connector\' = \'mysql-cdc\',
''hostname'' = ''127.0.0.1'', \'hostname\' = \'127.0.0.1\',
''port'' = ''3306'', \'port\' = \'3306\',
''username'' = ''root'', \'username\' = \'root\',
''password'' = ''123456'', \'password\' = \'123456\',
''checkpoint'' = ''10000'', \'checkpoint\' = \'10000\',
''scan.startup.mode'' = ''initial'', \'scan.startup.mode\' = \'initial\',
''parallelism'' = ''1'', \'parallelism\' = \'1\',
''database-name''=''bigdata'', \'database-name\'=\'bigdata\',
''table-name''=''bigdata\\.products,bigdata\\.orders'', \'table-name\'=\'bigdata\\.products,bigdata\\.orders\',
''sink.connector''=''hudi'', \'sink.connector\'=\'hudi\',
''sink.path''=''hdfs://nameservice1/data/hudi/${tableName}'', \'sink.path\'=\'hdfs://nameservice1/data/hudi/${tableName}\',
''sink.hoodie.datasource.write.recordkey.field''=''${pkList}'', \'sink.hoodie.datasource.write.recordkey.field\'=\'${pkList}\',
''sink.hoodie.parquet.max.file.size''=''268435456'', \'sink.hoodie.parquet.max.file.size\'=\'268435456\',
''sink.write.tasks''=''1'', \'sink.write.tasks\'=\'1\',
''sink.write.bucket_assign.tasks''=''2'', \'sink.write.bucket_assign.tasks\'=\'2\',
''sink.write.precombine''=''true'', \'sink.write.precombine\'=\'true\',
''sink.compaction.async.enabled''=''true'', \'sink.compaction.async.enabled\'=\'true\',
''sink.write.task.max.size''=''1024'', \'sink.write.task.max.size\'=\'1024\',
''sink.write.rate.limit''=''3000'', \'sink.write.rate.limit\'=\'3000\',
''sink.write.operation''=''upsert'', \'sink.write.operation\'=\'upsert\',
''sink.table.type''=''COPY_ON_WRITE'', \'sink.table.type\'=\'COPY_ON_WRITE\',
''sink.compaction.tasks''=''1'', \'sink.compaction.tasks\'=\'1\',
''sink.compaction.delta_seconds''=''20'', \'sink.compaction.delta_seconds\'=\'20\',
''sink.compaction.async.enabled''=''true'', \'sink.compaction.async.enabled\'=\'true\',
''sink.read.streaming.skip_compaction''=''true'', \'sink.read.streaming.skip_compaction\'=\'true\',
''sink.compaction.delta_commits''=''20'', \'sink.compaction.delta_commits\'=\'20\',
''sink.compaction.trigger.strategy''=''num_or_time'', \'sink.compaction.trigger.strategy\'=\'num_or_time\',
''sink.compaction.max_memory''=''500'', \'sink.compaction.max_memory\'=\'500\',
''sink.changelog.enabled''=''true'', \'sink.changelog.enabled\'=\'true\',
''sink.read.streaming.enabled''=''true'', \'sink.read.streaming.enabled\'=\'true\',
''sink.read.streaming.check.interval''=''3'', \'sink.read.streaming.check.interval\'=\'3\',
''sink.hive_sync.skip_ro_suffix'' = ''true'', \'sink.hive_sync.skip_ro_suffix\' = \'true\',
''sink.hive_sync.enable''=''true'', \'sink.hive_sync.enable\'=\'true\',
''sink.hive_sync.mode''=''hms'', \'sink.hive_sync.mode\'=\'hms\',
''sink.hive_sync.metastore.uris''=''thrift://bigdata1:9083'', \'sink.hive_sync.metastore.uris\'=\'thrift://bigdata1:9083\',
''sink.hive_sync.db''=''qhc_hudi_ods'', \'sink.hive_sync.db\'=\'qhc_hudi_ods\',
''sink.hive_sync.table''=''${tableName}'', \'sink.hive_sync.table\'=\'${tableName}\',
''sink.table.prefix.schema''=''true'' \'sink.table.prefix.schema\'=\'true\'
);', 'All Versions', 0, 1, '2023-10-31 16:05:50', '2023-10-31 16:08:53'); );', 'All Versions', 0, 1, '2023-10-31 16:05:50', '2023-12-28 00:02:57', null, null);
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (222, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE cdc_mysql', 'The entire library is synchronized to mysql', 'EXECUTE CDCSOURCE demo_startrocks WITH (
values (222, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE cdc_mysql', 'The entire library is synchronized to mysql', 'EXECUTE CDCSOURCE demo_startrocks WITH ( \'connector\' = \'mysql-cdc\',
''connector'' = ''mysql-cdc'', \'hostname\' = \'127.0.0.1\',
''hostname'' = ''127.0.0.1'', \'port\' = \'3306\',
''port'' = ''3306'', \'username\' = \'root\',
''username'' = ''root'', \'password\' = \'123456\',
''password'' = ''123456'', \'checkpoint\' = \'3000\',
''checkpoint'' = ''3000'', \'scan.startup.mode\' = \'initial\',
''scan.startup.mode'' = ''initial'', \'parallelism\' = \'1\',
''parallelism'' = ''1'', \'table-name\' = \'bigdata\\.products,bigdata\\.orders\',
''table-name'' = ''bigdata\\.products,bigdata\\.orders'', \'sink.connector\' = \'starrocks\',
''sink.connector'' = ''starrocks'', \'sink.jdbc-url\' = \'jdbc:mysql://127.0.0.1:19035\',
''sink.jdbc-url'' = ''jdbc:mysql://127.0.0.1:19035'', \'sink.load-url\' = \'127.0.0.1:18035\',
''sink.load-url'' = ''127.0.0.1:18035'', \'sink.username\' = \'root\',
''sink.username'' = ''root'', \'sink.password\' = \'123456\',
''sink.password'' = ''123456'', \'sink.sink.db\' = \'ods\',
''sink.sink.db'' = ''ods'', \'sink.table.prefix\' = \'ods_\',
''sink.table.prefix'' = ''ods_'', \'sink.table.lower\' = \'true\',
''sink.table.lower'' = ''true'', \'sink.database-name\' = \'ods\',
''sink.database-name'' = ''ods'', \'sink.table-name\' = \'${tableName}\',
''sink.table-name'' = ''${tableName}'', \'sink.sink.properties.format\' = \'json\',
''sink.sink.properties.format'' = ''json'', \'sink.sink.properties.strip_outer_array\' = \'true\',
''sink.sink.properties.strip_outer_array'' = ''true'', \'sink.sink.max-retries\' = \'10\',
''sink.sink.max-retries'' = ''10'', \'sink.sink.buffer-flush.interval-ms\' = \'15000\',
''sink.sink.buffer-flush.interval-ms'' = ''15000'', \'sink.sink.parallelism\' = \'1\'
''sink.sink.parallelism'' = ''1'' );', 'All Versions', 0, 1, '2023-10-31 16:07:08', '2023-12-28 00:02:57', null, null);
);', 'All Versions', 0, 1, '2023-10-31 16:07:08', '2023-10-31 16:08:46'); INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (223, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE demo_doris', 'The entire library is synchronized to mysql', 'EXECUTE CDCSOURCE cdc_mysql WITH (
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'connector\' = \'mysql-cdc\',
values (223, 'Reference', '建表语句', 'Streaming', 'EXECUTE CDCSOURCE demo_doris', 'The entire library is synchronized to mysql', 'EXECUTE CDCSOURCE cdc_mysql WITH ( \'hostname\' = \'127.0.0.1\',
''connector'' = ''mysql-cdc'', \'port\' = \'3306\',
''hostname'' = ''127.0.0.1'', \'username\' = \'root\',
''port'' = ''3306'', \'password\' = \'123456\',
''username'' = ''root'', \'checkpoint\' = \'3000\',
''password'' = ''123456'', \'scan.startup.mode\' = \'initial\',
''checkpoint'' = ''3000'', \'parallelism\' = \'1\',
''scan.startup.mode'' = ''initial'', \'table-name\' = \'bigdata\\.products,bigdata\\.orders\',
''parallelism'' = ''1'', \'sink.connector\' = \'jdbc\',
''table-name'' = ''bigdata\\.products,bigdata\\.orders'', \'sink.url\' = \'jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf-8&useSSL=false\',
''sink.connector'' = ''jdbc'', \'sink.username\' = \'root\',
''sink.url'' = ''jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf-8&useSSL=false'', \'sink.password\' = \'123456\',
''sink.username'' = ''root'', \'sink.sink.db\' = \'test\',
''sink.password'' = ''123456'', \'sink.table.prefix\' = \'test_\',
''sink.sink.db'' = ''test'', \'sink.table.lower\' = \'true\',
''sink.table.prefix'' = ''test_'', \'sink.table-name\' = \'${tableName}\',
''sink.table.lower'' = ''true'', \'sink.driver\' = \'com.mysql.jdbc.Driver\',
''sink.table-name'' = ''${tableName}'', \'sink.sink.buffer-flush.interval\' = \'2s\',
''sink.driver'' = ''com.mysql.jdbc.Driver'', \'sink.sink.buffer-flush.max-rows\' = \'100\',
''sink.sink.buffer-flush.interval'' = ''2s'', \'sink.sink.max-retries\' = \'5\',
''sink.sink.buffer-flush.max-rows'' = ''100'', \'sink.auto.create\' = \'true\'
''sink.sink.max-retries'' = ''5'', );', 'All Versions', 0, 1, '2023-10-31 16:07:47', '2023-12-28 00:02:57', null, null);
''sink.auto.create'' = ''true'' INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (224, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE cdc_oracle', 'The entire library is synchronized to cdc_oracle', 'EXECUTE CDCSOURCE cdc_oracle WITH (
);', 'All Versions', 0, 1, '2023-10-31 16:07:47', '2023-10-31 16:08:39'); \'connector\' = \'oracle-cdc\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'hostname\' = \'127.0.0.1\',
values (224, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE cdc_oracle', 'The entire library is synchronized to cdc_oracle', 'EXECUTE CDCSOURCE cdc_oracle WITH ( \'port\' = \'1521\',
''connector'' = ''oracle-cdc'', \'username\'=\'root\',
''hostname'' = ''127.0.0.1'', \'password\'=\'123456\',
''port'' = ''1521'', \'database-name\'=\'ORCL\',
''username''=''root'', \'checkpoint\' = \'3000\',
''password''=''123456'', \'scan.startup.mode\' = \'initial\',
''database-name''=''ORCL'', \'parallelism\' = \'1\',
''checkpoint'' = ''3000'', \'table-name\' = \'TEST\\..*\',
''scan.startup.mode'' = ''initial'', \'connector\' = \'jdbc\',
''parallelism'' = ''1'', \'url\' = \'jdbc:oracle:thin:@127.0.0.1:1521:orcl\',
''table-name'' = ''TEST\\..*'', \'username\' = \'root\',
''connector'' = ''jdbc'', \'password\' = \'123456\',
''url'' = ''jdbc:oracle:thin:@127.0.0.1:1521:orcl'', \'table-name\' = \'TEST2.${tableName}\'
''username'' = ''root'', );', 'All Versions', 0, 1, '2023-10-31 16:08:30', '2023-12-28 00:02:57', null, null);
''password'' = ''123456'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (225, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE cdc_kafka_one', 'The entire library is synchronized to a topic in kafka', 'EXECUTE CDCSOURCE cdc_kafka_one WITH (
''table-name'' = ''TEST2.${tableName}'' \'connector\' = \'mysql-cdc\',
);', 'All Versions', 0, 1, '2023-10-31 16:08:30', '2023-10-31 16:08:30'); \'hostname\' = \'127.0.0.1\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'port\' = \'3306\',
values (225, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE cdc_kafka_one', 'The entire library is synchronized to a topic in kafka', 'EXECUTE CDCSOURCE cdc_kafka_one WITH ( \'username\' = \'root\',
''connector'' = ''mysql-cdc'', \'password\' = \'123456\',
''hostname'' = ''127.0.0.1'', \'checkpoint\' = \'3000\',
''port'' = ''3306'', \'scan.startup.mode\' = \'initial\',
''username'' = ''root'', \'parallelism\' = \'1\',
''password'' = ''123456'', \'table-name\' = \'bigdata\\.products,bigdata\\.orders\',
''checkpoint'' = ''3000'', \'sink.connector\'=\'datastream-kafka\',
''scan.startup.mode'' = ''initial'', \'sink.topic\'=\'cdctest\',
''parallelism'' = ''1'', \'sink.brokers\'=\'bigdata2:9092,bigdata3:9092,bigdata4:9092\'
''table-name'' = ''bigdata\\.products,bigdata\\.orders'', );', 'All Versions', 0, 1, '2023-10-31 16:10:13', '2023-12-28 00:02:57', null, null);
''sink.connector''=''datastream-kafka'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (226, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE cdc_kafka_mul', 'The entire library is synchronized to a single topic in kafka', 'EXECUTE CDCSOURCE cdc_kafka_mul WITH (
''sink.topic''=''cdctest'', \'connector\' = \'mysql-cdc\',
''sink.brokers''=''bigdata2:9092,bigdata3:9092,bigdata4:9092'' \'hostname\' = \'127.0.0.1\',
);', 'All Versions', 0, 1, '2023-10-31 16:10:13', '2023-10-31 16:10:13'); \'port\' = \'3306\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'username\' = \'root\',
values (226, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE cdc_kafka_mul', 'The entire library is synchronized to a single topic in kafka', 'EXECUTE CDCSOURCE cdc_kafka_mul WITH ( \'password\' = \'123456\',
''connector'' = ''mysql-cdc'', \'checkpoint\' = \'3000\',
''hostname'' = ''127.0.0.1'', \'scan.startup.mode\' = \'initial\',
''port'' = ''3306'', \'parallelism\' = \'1\',
''username'' = ''root'', \'table-name\' = \'bigdata\\.products,bigdata\\.orders\',
''password'' = ''123456'', \'sink.connector\'=\'datastream-kafka\',
''checkpoint'' = ''3000'', \'sink.brokers\'=\'bigdata2:9092,bigdata3:9092,bigdata4:9092\'
''scan.startup.mode'' = ''initial'', )', 'All Versions', 0, 1, '2023-10-31 16:10:59', '2023-12-28 00:02:57', null, null);
''parallelism'' = ''1'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (227, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE cdc_upsert_kafka', 'The entire library is synchronized to kafka primary key mode', 'EXECUTE CDCSOURCE cdc_upsert_kafka WITH (
''table-name'' = ''bigdata\\.products,bigdata\\.orders'', \'connector\' = \'mysql-cdc\',
''sink.connector''=''datastream-kafka'', \'hostname\' = \'127.0.0.1\',
''sink.brokers''=''bigdata2:9092,bigdata3:9092,bigdata4:9092'' \'port\' = \'3306\',
)', 'All Versions', 0, 1, '2023-10-31 16:10:59', '2023-10-31 16:10:59'); \'username\' = \'root\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'password\' = \'123456\',
values (227, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE cdc_upsert_kafka', 'The entire library is synchronized to kafka primary key mode', 'EXECUTE CDCSOURCE cdc_upsert_kafka WITH ( \'checkpoint\' = \'3000\',
''connector'' = ''mysql-cdc'', \'scan.startup.mode\' = \'initial\',
''hostname'' = ''127.0.0.1'', \'parallelism\' = \'1\',
''port'' = ''3306'', \'table-name\' = \'bigdata\\.products,bigdata\\.orders\',
''username'' = ''root'', \'sink.connector\' = \'upsert-kafka\',
''password'' = ''123456'', \'sink.topic\' = \'${tableName}\',
''checkpoint'' = ''3000'', \'sink.properties.bootstrap.servers\' = \'bigdata2:9092,bigdata3:9092,bigdata4:9092\',
''scan.startup.mode'' = ''initial'', \'sink.key.format\' = \'json\',
''parallelism'' = ''1'', \'sink.value.format\' = \'json\'
''table-name'' = ''bigdata\\.products,bigdata\\.orders'', );', 'All Versions', 0, 1, '2023-10-31 16:12:14', '2023-12-28 00:02:57', null, null);
''sink.connector'' = ''upsert-kafka'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (228, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE cdc_postgresql ', 'The entire library is synchronized to postgresql', 'EXECUTE CDCSOURCE cdc_postgresql WITH (
''sink.topic'' = ''${tableName}'', \'connector\' = \'mysql-cdc\',
''sink.properties.bootstrap.servers'' = ''bigdata2:9092,bigdata3:9092,bigdata4:9092'', \'hostname\' = \'127.0.0.1\',
''sink.key.format'' = ''json'', \'port\' = \'3306\',
''sink.value.format'' = ''json'' \'username\' = \'root\',
);', 'All Versions', 0, 1, '2023-10-31 16:12:14', '2023-10-31 16:12:14'); \'password\' = \'123456\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'checkpoint\' = \'3000\',
values (228, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE cdc_postgresql ', 'The entire library is synchronized to postgresql', 'EXECUTE CDCSOURCE cdc_postgresql WITH ( \'scan.startup.mode\' = \'initial\',
''connector'' = ''mysql-cdc'', \'parallelism\' = \'1\',
''hostname'' = ''127.0.0.1'', \'table-name\' = \'bigdata\\.products,bigdata\\.orders\',
''port'' = ''3306'', \'sink.connector\' = \'jdbc\',
''username'' = ''root'', \'sink.url\' = \'jdbc:postgresql://127.0.0.1:5432/test\',
''password'' = ''123456'', \'sink.username\' = \'test\',
''checkpoint'' = ''3000'', \'sink.password\' = \'123456\',
''scan.startup.mode'' = ''initial'', \'sink.sink.db\' = \'test\',
''parallelism'' = ''1'', \'sink.table.prefix\' = \'test_\',
''table-name'' = ''bigdata\\.products,bigdata\\.orders'', \'sink.table.lower\' = \'true\',
''sink.connector'' = ''jdbc'', \'sink.table-name\' = \'${tableName}\',
''sink.url'' = ''jdbc:postgresql://127.0.0.1:5432/test'', \'sink.driver\' = \'org.postgresql.Driver\',
''sink.username'' = ''test'', \'sink.sink.buffer-flush.interval\' = \'2s\',
''sink.password'' = ''123456'', \'sink.sink.buffer-flush.max-rows\' = \'100\',
''sink.sink.db'' = ''test'', \'sink.sink.max-retries\' = \'5\'
''sink.table.prefix'' = ''test_'', )', 'All Versions', 0, 1, '2023-10-31 16:12:54', '2023-12-28 00:02:57', null, null);
''sink.table.lower'' = ''true'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (229, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE cdc_clickhouse', 'Sync the entire library to clickhouse', 'EXECUTE CDCSOURCE cdc_clickhouse WITH (
''sink.table-name'' = ''${tableName}'', \'connector\' = \'mysql-cdc\',
''sink.driver'' = ''org.postgresql.Driver'', \'hostname\' = \'127.0.0.1\',
''sink.sink.buffer-flush.interval'' = ''2s'', \'port\' = \'3306\',
''sink.sink.buffer-flush.max-rows'' = ''100'', \'username\' = \'root\',
''sink.sink.max-retries'' = ''5'' \'password\' = \'123456\',
)', 'All Versions', 0, 1, '2023-10-31 16:12:54', '2023-10-31 16:12:54'); \'checkpoint\' = \'3000\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'scan.startup.mode\' = \'initial\',
values (229, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE cdc_clickhouse', 'Sync the entire library to clickhouse', 'EXECUTE CDCSOURCE cdc_clickhouse WITH ( \'parallelism\' = \'1\',
''connector'' = ''mysql-cdc'', \'table-name\' = \'bigdata\\.products,bigdata\\.orders\',
''hostname'' = ''127.0.0.1'', \'sink.connector\' = \'clickhouse\',
''port'' = ''3306'', \'sink.url\' = \'clickhouse://127.0.0.1:8123\',
''username'' = ''root'', \'sink.username\' = \'default\',
''password'' = ''123456'', \'sink.password\' = \'123456\',
''checkpoint'' = ''3000'', \'sink.sink.db\' = \'test\',
''scan.startup.mode'' = ''initial'', \'sink.table.prefix\' = \'test_\',
''parallelism'' = ''1'', \'sink.table.lower\' = \'true\',
''table-name'' = ''bigdata\\.products,bigdata\\.orders'', \'sink.database-name\' = \'test\',
''sink.connector'' = ''clickhouse'', \'sink.table-name\' = \'${tableName}\',
''sink.url'' = ''clickhouse://127.0.0.1:8123'', \'sink.sink.batch-size\' = \'500\',
''sink.username'' = ''default'', \'sink.sink.flush-interval\' = \'1000\',
''sink.password'' = ''123456'', \'sink.sink.max-retries\' = \'3\'
''sink.sink.db'' = ''test'', );', 'All Versions', 0, 1, '2023-10-31 16:13:33', '2023-12-28 00:02:57', null, null);
''sink.table.prefix'' = ''test_'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (230, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE mysql2hive', 'The entire library is synchronized to the sql-catalog of hive', 'EXECUTE CDCSOURCE mysql2hive WITH (
''sink.table.lower'' = ''true'', \'connector\' = \'mysql-cdc\',
''sink.database-name'' = ''test'', \'hostname\' = \'127.0.0.1\',
''sink.table-name'' = ''${tableName}'', \'port\' = \'3306\',
''sink.sink.batch-size'' = ''500'', \'username\' = \'root\',
''sink.sink.flush-interval'' = ''1000'', \'password\' = \'123456\',
''sink.sink.max-retries'' = ''3'' \'checkpoint\' = \'10000\',
);', 'All Versions', 0, 1, '2023-10-31 16:13:33', '2023-10-31 16:13:33'); \'scan.startup.mode\' = \'initial\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'parallelism\' = \'1\',
values (230, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE mysql2hive', 'The entire library is synchronized to the sql-catalog of hive', 'EXECUTE CDCSOURCE mysql2hive WITH ( \'table-name\' = \'test\\..*\',
''connector'' = ''mysql-cdc'', \'sink.connector\' = \'sql-catalog\',
''hostname'' = ''127.0.0.1'', \'sink.catalog.name\' = \'hive\',
''port'' = ''3306'', \'sink.catalog.type\' = \'hive\',
''username'' = ''root'', \'sink.default-database\' = \'hdb\',
''password'' = ''123456'', \'sink.hive-conf-dir\' = \'/usr/local/dlink/hive-conf\'
''checkpoint'' = ''10000'', );', 'All Versions', 0, 1, '2023-10-31 16:14:31', '2023-12-28 00:02:57', null, null);
''scan.startup.mode'' = ''initial'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (231, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE mysql2paimon', 'The entire library is synchronized to paimon', 'EXECUTE CDCSOURCE mysql2paimon WITH (
''parallelism'' = ''1'', \'connector\' = \'mysql-cdc\',
''table-name'' = ''test\\..*'', \'hostname\' = \'127.0.0.1\',
''sink.connector'' = ''sql-catalog'', \'port\' = \'3306\',
''sink.catalog.name'' = ''hive'', \'username\' = \'root\',
''sink.catalog.type'' = ''hive'', \'password\' = \'123456\',
''sink.default-database'' = ''hdb'', \'checkpoint\' = \'10000\',
''sink.hive-conf-dir'' = ''/usr/local/dlink/hive-conf'' \'scan.startup.mode\' = \'initial\',
);', 'All Versions', 0, 1, '2023-10-31 16:14:31', '2023-10-31 16:14:31'); \'parallelism\' = \'1\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'table-name\' = \'test\\..*\',
values (231, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE mysql2paimon', 'The entire library is synchronized to paimon', 'EXECUTE CDCSOURCE mysql2paimon WITH ( \'sink.connector\' = \'sql-catalog\',
''connector'' = ''mysql-cdc'', \'sink.catalog.name\' = \'fts\',
''hostname'' = ''127.0.0.1'', \'sink.catalog.type\' = \'table-store\',
''port'' = ''3306'', \'sink.catalog.warehouse\'=\'file:/tmp/table_store\'
''username'' = ''root'', );', 'All Versions', 0, 1, '2023-10-31 16:15:22', '2023-12-28 00:02:57', null, null);
''password'' = ''123456'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (232, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE mysql2dinky_catalog', 'The entire library is synchronized to dinky\'s built-in catalog', 'EXECUTE CDCSOURCE mysql2dinky_catalog WITH (
''checkpoint'' = ''10000'', \'connector\' = \'mysql-cdc\',
''scan.startup.mode'' = ''initial'', \'hostname\' = \'127.0.0.1\',
''parallelism'' = ''1'', \'port\' = \'3306\',
''table-name'' = ''test\\..*'', \'username\' = \'root\',
''sink.connector'' = ''sql-catalog'', \'password\' = \'123456\',
''sink.catalog.name'' = ''fts'', \'checkpoint\' = \'10000\',
''sink.catalog.type'' = ''table-store'', \'scan.startup.mode\' = \'initial\',
''sink.catalog.warehouse''=''file:/tmp/table_store'' \'parallelism\' = \'1\',
);', 'All Versions', 0, 1, '2023-10-31 16:15:22', '2023-10-31 16:28:52'); \'table-name\' = \'test\\..*\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'sink.connector\' = \'sql-catalog\',
values (232, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE mysql2dinky_catalog', 'The entire library is synchronized to dinky''s built-in catalog', 'EXECUTE CDCSOURCE mysql2dinky_catalog WITH ( \'sink.catalog.name\' = \'dlinkmysql\',
''connector'' = ''mysql-cdc'', \'sink.catalog.type\' = \'dlink_mysql\',
''hostname'' = ''127.0.0.1'', \'sink.catalog.username\' = \'dlink\',
''port'' = ''3306'', \'sink.catalog.password\' = \'dlink\',
''username'' = ''root'', \'sink.catalog.url\' = \'jdbc:mysql://127.0.0.1:3306/dlink?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC\',
''password'' = ''123456'', \'sink.sink.db\' = \'default_database\'
''checkpoint'' = ''10000'', );', 'All Versions', 0, 1, '2023-10-31 16:16:22', '2023-12-28 00:02:57', null, null);
''scan.startup.mode'' = ''initial'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (233, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE mysql2multiple_sink', 'Synchronization of the entire library to multiple data sources (sink)', 'EXECUTE CDCSOURCE mysql2multiple_sink WITH (
''parallelism'' = ''1'', \'connector\' = \'mysql-cdc\',
''table-name'' = ''test\\..*'', \'hostname\' = \'127.0.0.1\',
''sink.connector'' = ''sql-catalog'', \'port\' = \'3306\',
''sink.catalog.name'' = ''dlinkmysql'', \'username\' = \'root\',
''sink.catalog.type'' = ''dlink_mysql'', \'password\' = \'123456\',
''sink.catalog.username'' = ''dlink'', \'checkpoint\' = \'3000\',
''sink.catalog.password'' = ''dlink'', \'scan.startup.mode\' = \'initial\',
''sink.catalog.url'' = ''jdbc:mysql://127.0.0.1:3306/dlink?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC'', \'parallelism\' = \'1\',
''sink.sink.db'' = ''default_database'' \'table-name\' = \'test\\.student,test\\.score\',
);', 'All Versions', 0, 1, '2023-10-31 16:16:22', '2023-10-31 16:16:22'); \'sink[0].connector\' = \'doris\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'sink[0].fenodes\' = \'127.0.0.1:8030\',
values (233, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE mysql2multiple_sink', 'Synchronization of the entire library to multiple data sources (sink)', 'EXECUTE CDCSOURCE mysql2multiple_sink WITH ( \'sink[0].username\' = \'root\',
''connector'' = ''mysql-cdc'', \'sink[0].password\' = \'dw123456\',
''hostname'' = ''127.0.0.1'', \'sink[0].sink.batch.size\' = \'1\',
''port'' = ''3306'', \'sink[0].sink.max-retries\' = \'1\',
''username'' = ''root'', \'sink[0].sink.batch.interval\' = \'60000\',
''password'' = ''123456'', \'sink[0].sink.db\' = \'test\',
''checkpoint'' = ''3000'', \'sink[0].table.prefix\' = \'ODS_\',
''scan.startup.mode'' = ''initial'', \'sink[0].table.upper\' = \'true\',
''parallelism'' = ''1'', \'sink[0].table.identifier\' = \'${schemaName}.${tableName}\',
''table-name'' = ''test\\.student,test\\.score'', \'sink[0].sink.label-prefix\' = \'${schemaName}_${tableName}_1\',
''sink[0].connector'' = ''doris'', \'sink[0].sink.enable-delete\' = \'true\',
''sink[0].fenodes'' = ''127.0.0.1:8030'', \'sink[1].connector\'=\'datastream-kafka\',
''sink[0].username'' = ''root'', \'sink[1].topic\'=\'cdc\',
''sink[0].password'' = ''dw123456'', \'sink[1].brokers\'=\'127.0.0.1:9092\'
''sink[0].sink.batch.size'' = ''1'', )', 'All Versions', 0, 1, '2023-10-31 16:17:27', '2023-12-28 00:02:57', null, null);
''sink[0].sink.max-retries'' = ''1'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (234, 'Reference', 'FUN_UDF', 'OTHER_FUNCTION', 'ADD JAR', 'ADD JAR', 'ADD JAR ${1:}; -- str path ', 'All Versions', 0, 1, '2023-10-31 16:19:52', '2023-12-28 00:02:02', null, null);
''sink[0].sink.batch.interval'' = ''60000'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (235, 'Function', 'Other', 'Other', 'SHOW FRAGMENTS', 'SHOW FRAGMENTS', 'SHOW FRAGMENTS;', 'All Versions', 0, 1, '2023-10-31 16:20:30', '2023-12-28 09:57:55', null, null);
''sink[0].sink.db'' = ''test'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (236, 'Function', 'Other', 'Other', 'SHOW FRAGMENT var1', 'SHOW FRAGMENT var1', 'SHOW FRAGMENT ${1:};', 'All Versions', 0, 1, '2023-10-31 16:21:23', '2023-12-28 09:57:54', null, null);
''sink[0].table.prefix'' = ''ODS_'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (237, 'Reference', 'SQL_TEMPLATE', 'FlinkCDC', 'EXECUTE CDCSOURCE demo_hudi', 'The entire library is synchronized to hudi', 'EXECUTE CDCSOURCE demo_hudi WITH (
''sink[0].table.upper'' = ''true'', \'connector\' = \'mysql-cdc\',
''sink[0].table.identifier'' = ''${schemaName}.${tableName}'', \'hostname\' = \'127.0.0.1\',
''sink[0].sink.label-prefix'' = ''${schemaName}_${tableName}_1'', \'port\' = \'3306\',
''sink[0].sink.enable-delete'' = ''true'', \'username\' = \'root\',
''sink[1].connector''=''datastream-kafka'', \'password\' = \'123456\',
''sink[1].topic''=''cdc'', \'checkpoint\' = \'10000\',
''sink[1].brokers''=''127.0.0.1:9092'' \'scan.startup.mode\' = \'initial\',
)', 'All Versions', 0, 1, '2023-10-31 16:17:27', '2023-10-31 16:17:27'); \'parallelism\' = \'1\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'database-name\'=\'bigdata\',
values (234, 'Reference', '建表语句', 'Batch/Streaming', 'ADD JAR', 'ADD JAR', 'ADD JAR ${1:}; -- str path ', 'All Versions', 0, 1, '2023-10-31 16:19:52', '2023-10-31 16:23:16'); \'table-name\'=\'bigdata\\.products,bigdata\\.orders\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'sink.connector\'=\'hudi\',
values (235, 'Function', 'Other', 'Batch/Streaming', 'SHOW FRAGMENTS', 'SHOW FRAGMENTS', 'SHOW FRAGMENTS;', 'All Versions', 0, 1, '2023-10-31 16:20:30', '2023-10-31 16:20:30'); \'sink.path\'=\'hdfs://nameservice1/data/hudi/${tableName}\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'sink.hoodie.datasource.write.recordkey.field\'=\'${pkList}\',
values (236, 'Function', 'Other', 'Batch/Streaming', 'SHOW FRAGMENT var1', 'SHOW FRAGMENT var1', 'SHOW FRAGMENT ${1:};', 'All Versions', 0, 1, '2023-10-31 16:21:23', '2023-10-31 16:21:23'); \'sink.hoodie.parquet.max.file.size\'=\'268435456\',
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) \'sink.write.tasks\'=\'1\',
values (237, 'Reference', '建表语句', 'Batch/Streaming', 'EXECUTE CDCSOURCE demo_hudi', 'The entire library is synchronized to hudi', 'EXECUTE CDCSOURCE demo_hudi WITH ( \'sink.write.bucket_assign.tasks\'=\'2\',
''connector'' = ''mysql-cdc'', \'sink.write.precombine\'=\'true\',
''hostname'' = ''127.0.0.1'', \'sink.compaction.async.enabled\'=\'true\',
''port'' = ''3306'', \'sink.write.task.max.size\'=\'1024\',
''username'' = ''root'', \'sink.write.rate.limit\'=\'3000\',
''password'' = ''123456'', \'sink.write.operation\'=\'upsert\',
''checkpoint'' = ''10000'', \'sink.table.type\'=\'COPY_ON_WRITE\',
''scan.startup.mode'' = ''initial'', \'sink.compaction.tasks\'=\'1\',
''parallelism'' = ''1'', \'sink.compaction.delta_seconds\'=\'20\',
''database-name''=''bigdata'', \'sink.compaction.async.enabled\'=\'true\',
''table-name''=''bigdata\\.products,bigdata\\.orders'', \'sink.read.streaming.skip_compaction\'=\'true\',
''sink.connector''=''hudi'', \'sink.compaction.delta_commits\'=\'20\',
''sink.path''=''hdfs://nameservice1/data/hudi/${tableName}'', \'sink.compaction.trigger.strategy\'=\'num_or_time\',
''sink.hoodie.datasource.write.recordkey.field''=''${pkList}'', \'sink.compaction.max_memory\'=\'500\',
''sink.hoodie.parquet.max.file.size''=''268435456'', \'sink.changelog.enabled\'=\'true\',
''sink.write.tasks''=''1'', \'sink.read.streaming.enabled\'=\'true\',
''sink.write.bucket_assign.tasks''=''2'', \'sink.read.streaming.check.interval\'=\'3\',
''sink.write.precombine''=''true'', \'sink.hive_sync.skip_ro_suffix\' = \'true\',
''sink.compaction.async.enabled''=''true'', \'sink.hive_sync.enable\'=\'true\',
''sink.write.task.max.size''=''1024'', \'sink.hive_sync.mode\'=\'hms\',
''sink.write.rate.limit''=''3000'', \'sink.hive_sync.metastore.uris\'=\'thrift://bigdata1:9083\',
''sink.write.operation''=''upsert'', \'sink.hive_sync.db\'=\'qhc_hudi_ods\',
''sink.table.type''=''COPY_ON_WRITE'', \'sink.hive_sync.table\'=\'${tableName}\',
''sink.compaction.tasks''=''1'', \'sink.table.prefix.schema\'=\'true\'
''sink.compaction.delta_seconds''=''20'', );', 'All Versions', 0, 1, '2023-10-31 16:24:47', '2023-12-28 00:02:57', null, null);
''sink.compaction.async.enabled''=''true'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (238, 'Reference', 'SQL_TEMPLATE', 'FlinkJar', 'EXECUTE JAR ', 'EXECUTE JAR use sql', 'EXECUTE JAR WITH (
''sink.read.streaming.skip_compaction''=''true'', \'uri\'=\'rs:///jar/flink/demo/SocketWindowWordCount.jar\',
''sink.compaction.delta_commits''=''20'', \'main-class\'=\'org.apache.flink.streaming.examples.socket\',
''sink.compaction.trigger.strategy''=''num_or_time'', \'args\'=\' --hostname localhost \',
''sink.compaction.max_memory''=''500'', \'parallelism\'=\'\',
''sink.changelog.enabled''=''true'', \'savepoint-path\'=\'\'
''sink.read.streaming.enabled''=''true'', );', 'All Versions', 0, 1, '2023-10-31 16:27:53', '2023-12-28 09:57:54', null, null);
''sink.read.streaming.check.interval''=''3'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (239, 'Reference', 'FUN_UDF', 'OTHER_FUNCTION', 'PRINT tablename', 'PRINT table data', 'PRINT ${1:}', 'All Versions', 0, 1, '2023-10-31 16:30:22', '2023-12-28 00:09:39', null, null);
''sink.hive_sync.skip_ro_suffix'' = ''true'', INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (240, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'CREATE TABLE Like', 'CREATE TABLE Like source table', 'DROP TABLE IF EXISTS sink_table;
''sink.hive_sync.enable''=''true'',
''sink.hive_sync.mode''=''hms'',
''sink.hive_sync.metastore.uris''=''thrift://bigdata1:9083'',
''sink.hive_sync.db''=''qhc_hudi_ods'',
''sink.hive_sync.table''=''${tableName}'',
''sink.table.prefix.schema''=''true''
);', 'All Versions', 0, 1, '2023-10-31 16:24:47', '2023-10-31 16:24:47');
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time)
values (238, 'Reference', 'Other', 'Batch/Streaming', 'EXECUTE JAR ', 'EXECUTE JAR use sql', 'EXECUTE JAR WITH (
''uri''=''file:///opt/flink/lib/paimon-flink-1.16-0.5-20230818.001833-127.jar'',
''main-class''=''org.apache.paimon.flink.action.FlinkActions'',
''args''=''mysql-sync-table --warehouse hdfs:///save --database cdc-test --table cdc_test1 --primary-keys id --mysql-conf hostname=121.5.136.161 --mysql-conf port=3371 --mysql-conf username=root --mysql-conf password=dinky --mysql-conf database-name=cdc-test --mysql-conf table-name=table_1 --mysql-conf server-time-zone=Asia/Shanghai --table-conf bucket=4 --table-conf changelog-producer=input --table-conf sink.parallelism=1'',
''parallelism''='''',
''savepoint-path''=''''
);', 'All Versions', 0, 1, '2023-10-31 16:27:53', '2023-10-31 16:27:53');
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time)
values (239, 'Reference', '内置函数', 'Streaming', 'PRINT tablename', 'PRINT table data', 'PRINT ${1:}', 'All Versions', 0, 1, '2023-10-31 16:30:22', '2023-10-31 16:30:22');
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time)
values (240, 'Reference', '建表语句', 'Batch/Streaming', 'CREATE TABLE Like', 'CREATE TABLE Like source table', 'DROP TABLE IF EXISTS sink_table;
CREATE TABLE IF not EXISTS sink_table CREATE TABLE IF not EXISTS sink_table
WITH ( WITH (
''topic'' = ''motor_vehicle_error'' \'topic\' = \'motor_vehicle_error\'
) )
LIKE source_table;', 'All Versions', 0, 1, '2023-10-31 16:33:38', '2023-10-31 16:33:38'); LIKE source_table;', 'All Versions', 0, 1, '2023-10-31 16:33:38', '2023-12-28 00:02:57', null, null);
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (241, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'CREATE TABLE like source_table EXCLUDING', 'CREATE TABLE like source_table EXCLUDING', 'DROP TABLE IF EXISTS sink_table;
values (241, 'Reference', '建表语句', 'Batch/Streaming', 'CREATE TABLE like source_table EXCLUDING', 'CREATE TABLE like source_table EXCLUDING', 'DROP TABLE IF EXISTS sink_table;
CREATE TABLE IF not EXISTS sink_table( CREATE TABLE IF not EXISTS sink_table(
-- Add watermark definition -- Add watermark definition
WATERMARK FOR order_time AS order_time - INTERVAL ''5'' SECOND WATERMARK FOR order_time AS order_time - INTERVAL \'5\' SECOND
) )
WITH ( WITH (
''topic'' = ''motor_vehicle_error'' \'topic\' = \'motor_vehicle_error\'
) )
LIKE source_table ( LIKE source_table (
-- Exclude everything besides the computed columns which we need to generate the watermark for. -- Exclude everything besides the computed columns which we need to generate the watermark for.
-- We do not want to have the partitions or filesystem options as those do not apply to kafka. -- We do not want to have the partitions or filesystem options as those do not apply to kafka.
EXCLUDING ALL EXCLUDING ALL
INCLUDING GENERATED INCLUDING GENERATED
);', 'All Versions', 0, 1, '2023-10-31 16:36:13', '2023-10-31 16:36:13'); );', 'All Versions', 0, 1, '2023-10-31 16:36:13', '2023-12-28 00:02:57', null, null);
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (242, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'CREATE TABLE ctas_kafka', 'CREATE TABLE ctas_kafka', 'CREATE TABLE my_ctas_table
values (242, 'Reference', '建表语句', 'Batch/Streaming', 'CREATE TABLE ctas_kafka', 'CREATE TABLE ctas_kafka', 'CREATE TABLE my_ctas_table
WITH ( WITH (
''connector'' = ''kafka'' \'connector\' = \'kafka\'
) )
AS SELECT id, name, age FROM source_table WHERE mod(id, 10) = 0;', 'All Versions', 0, 1, '2023-10-31 16:37:33', '2023-10-31 16:47:17'); AS SELECT id, name, age FROM source_table WHERE mod(id, 10) = 0;', 'All Versions', 0, 1, '2023-10-31 16:37:33', '2023-12-28 00:02:57', null, null);
insert into `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (243, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'CREATE TABLE rtas_kafka', 'CREATE TABLE rtas_kafka', 'CREATE OR REPLACE TABLE my_ctas_table
values (243, 'Reference', '建表语句', 'Batch/Streaming', 'CREATE TABLE rtas_kafka', 'CREATE TABLE rtas_kafka', 'CREATE OR REPLACE TABLE my_ctas_table
WITH ( WITH (
''connector'' = ''kafka'' \'connector\' = \'kafka\'
) )
AS SELECT id, name, age FROM source_table WHERE mod(id, 10) = 0;', 'All Versions', 0, 1, '2023-10-31 16:41:46', '2023-10-31 16:43:29'); AS SELECT id, name, age FROM source_table WHERE mod(id, 10) = 0;', 'All Versions', 0, 1, '2023-10-31 16:41:46', '2023-12-28 00:02:57', null, null);
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (244, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'datagen job demo', 'datagen job demo', 'DROP TABLE IF EXISTS source_table3;
INSERT INTO `dinky_flink_document` (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) VALUES (244, 'Reference', '建表语句', 'Batch/Streaming', 'datagen job demo', 'datagen job demo', 'DROP TABLE IF EXISTS source_table3;
CREATE TABLE IF NOT EXISTS source_table3( CREATE TABLE IF NOT EXISTS source_table3(
--订单id --订单id
`order_id` BIGINT, `order_id` BIGINT,
...@@ -769,9 +739,8 @@ ORDER BY order_time ...@@ -769,9 +739,8 @@ ORDER BY order_time
-- 标识统计范围是1个 product 的最近 1 分钟的数据 -- 标识统计范围是1个 product 的最近 1 分钟的数据
RANGE BETWEEN INTERVAL \'1\' MINUTE PRECEDING AND CURRENT ROW RANGE BETWEEN INTERVAL \'1\' MINUTE PRECEDING AND CURRENT ROW
) as one_minute_sum ) as one_minute_sum
FROM source_table3;', 'All Versions', 0, 1, '2023-11-15 15:42:16', '2023-11-15 15:42:16'); FROM source_table3;', 'All Versions', 0, 1, '2023-11-15 15:42:16', '2023-12-28 00:02:57', null, null);
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (245, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'checkpoint config', 'checkpoint config', '-- 声明一些调优参数 (checkpoint 等相关配置)
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time) VALUES (245, 'Property', '优化参数', 'Streaming', 'checkpoint config', 'checkpoint config', '-- 声明一些调优参数 (checkpoint 等相关配置)
set \'execution.checkpointing.checkpoints-after-tasks-finish.enabled\' =\'true\'; set \'execution.checkpointing.checkpoints-after-tasks-finish.enabled\' =\'true\';
SET \'pipeline.operator-chaining\' = \'false\'; SET \'pipeline.operator-chaining\' = \'false\';
set \'state.savepoints.dir\'=\'file:///opt/data/flink_cluster/savepoints\'; -- 目录自行修改 set \'state.savepoints.dir\'=\'file:///opt/data/flink_cluster/savepoints\'; -- 目录自行修改
...@@ -781,7 +750,37 @@ set \'state.backend.type\'=\'rocksdb\'; ...@@ -781,7 +750,37 @@ set \'state.backend.type\'=\'rocksdb\';
set \'execution.checkpointing.interval\'=\'60 s\'; set \'execution.checkpointing.interval\'=\'60 s\';
set \'state.checkpoints.num-retained\'=\'100\'; set \'state.checkpoints.num-retained\'=\'100\';
-- 使 solt 均匀分布在 各个 TM 上 -- 使 solt 均匀分布在 各个 TM 上
set \'cluster.evenly-spread-out-slots\'=\'true\';', 'All Versions', 0, 1, '2023-11-15 15:57:42', '2023-11-15 15:57:42'); set \'cluster.evenly-spread-out-slots\'=\'true\';', 'All Versions', 0, 1, '2023-11-15 15:57:42', '2023-12-28 15:49:20', null, null);
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (246, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'note template', 'note template', '-- -----------------------------------------------------------------
-- @Description(作业描述): ${1:}
-- @Creator(创建人): ${2:}
-- @Create DateTime(创建时间): ${3:}
-- -----------------------------------------------------------------
${4:}', 'All Versions', 0, 1, '2023-11-17 17:03:24', '2023-12-28 12:05:20', 1, 1);
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (247, 'Reference', 'SQL_TEMPLATE', 'FlinkSql', 'dinky_paimon_auto_create_table', 'dinky paimon auto create table', '-- -----------------------------------------------------------------
-- 该 demo 用于创建 mysql-cdc 到 paimon 的整库同步案例 并使用自动建表,注意 #{schemaName} 和 #{tableName} 为固定写法,不要修改,用于动态获取库名和表名
-- -----------------------------------------------------------------
EXECUTE CDCSOURCE dinky_paimon_auto_create_table
WITH
(
\'connector\' = \'mysql-cdc\',
\'hostname\' = \'\',
\'port\' = \'\',
\'username\' = \'\',
\'password\' = \'\',
\'checkpoint\' = \'10000\',
\'parallelism\' = \'1\',
\'scan.startup.mode\' = \'initial\',
\'database-name\' = \'dinky\',
\'sink.connector\' = \'paimon\',
\'sink.path\' = \'hdfs:/tmp/paimon/#{schemaName}.db/#{tableName}\',
\'sink.auto-create\' = \'true\',
);', 'All Versions', 0, 1, '2023-12-27 16:53:37', '2023-12-28 12:05:20', 1, 1);
INSERT INTO dinky_flink_document (id, category, type, subtype, name, description, fill_value, version, like_num, enabled, create_time, update_time, creator, updater) VALUES (248, 'Reference', 'FUN_UDF', 'OTHER_FUNCTION', 'add-customjar', 'add CUSTOMJAR 为 Dinky 扩展语法 功能实现和 add jar 类似 , 推荐使用此方式', '-- add CUSTOMJAR 为 Dinky 扩展语法 功能实现和 add jar 类似 , 推荐使用此方式
add CUSTOMJAR \'${1:}\';', 'All Versions', 0, 1, '2023-12-28 10:50:17', '2023-12-28 15:49:40', 1, 1);
-- 修改 dinky_udf_template 表的 enable 字段 不允许为空 默认为 1 -- 修改 dinky_udf_template 表的 enable 字段 不允许为空 默认为 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment