Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
ca7795c1
Unverified
Commit
ca7795c1
authored
Nov 24, 2022
by
ZackYoung
Committed by
GitHub
Nov 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimize]Optimize github workflow pom (#1313)
* 更新profile * add udf_template sql
parent
cbd41808
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
19 deletions
+55
-19
backend.yaml
.github/workflows/backend.yaml
+1
-1
dinky.sql
dlink-doc/sql/dinky.sql
+16
-0
pom.xml
pom.xml
+38
-18
No files found.
.github/workflows/backend.yaml
View file @
ca7795c1
...
...
@@ -98,7 +98,7 @@ jobs:
./mvnw -B clean install \
-Dmaven.test.skip=true \
-Dcheckstyle.skip=true \
-P prod,scala-2.12,flink-${{ matrix.flink }} \
-P prod,scala-2.12,flink-${{ matrix.flink }}
,maven-central
\
--no-snapshot-updates
# 查看打包的大小
...
...
dlink-doc/sql/dinky.sql
View file @
ca7795c1
...
...
@@ -940,6 +940,22 @@ CREATE TABLE `dlink_udf_template` (
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'udf template'
;
-- ----------------------------
-- Records of dlink_udf_template
-- ----------------------------
INSERT
INTO
`dlink_udf_template`
(
`id`
,
`name`
,
`code_type`
,
`function_type`
,
`template_code`
,
`enabled`
,
`create_time`
,
`update_time`
)
VALUES
(
1
,
'java_udf'
,
'Java'
,
'UDF'
,
'${(package==
\'\'
)?string(
\'\'
,
\'
package
\'
+package+
\'
;
\'
)}
\n\n
import org.apache.flink.table.functions.ScalarFunction;
\n\n
public class ${className} extends ScalarFunction {
\n
public String eval(String s) {
\n
return null;
\n
}
\n
}'
,
NULL
,
'2022-10-19 09:17:37'
,
'2022-10-25 17:45:57'
);
INSERT
INTO
`dlink_udf_template`
(
`id`
,
`name`
,
`code_type`
,
`function_type`
,
`template_code`
,
`enabled`
,
`create_time`
,
`update_time`
)
VALUES
(
2
,
'java_udtf'
,
'Java'
,
'UDTF'
,
'${(package==
\'\'
)?string(
\'\'
,
\'
package
\'
+package+
\'
;
\'
)}
\n\n
import org.apache.flink.table.functions.ScalarFunction;
\n\n
@FunctionHint(output = @DataTypeHint(
\"
ROW<word STRING, length INT>
\"
))
\n
public 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
}'
,
NULL
,
'2022-10-19 09:22:58'
,
'2022-10-25 17:49:30'
);
INSERT
INTO
`dlink_udf_template`
(
`id`
,
`name`
,
`code_type`
,
`function_type`
,
`template_code`
,
`enabled`
,
`create_time`
,
`update_time`
)
VALUES
(
3
,
'scala_udf'
,
'Scala'
,
'UDF'
,
'${(package==
\'\'
)?string(
\'\'
,
\'
package
\'
+package+
\'
;
\'
)}
\n\n
import org.apache.flink.table.api._
\n
import org.apache.flink.table.functions.ScalarFunction
\n\n
// 定义可参数化的函数逻辑
\n
class ${className} extends ScalarFunction {
\n
def eval(s: String, begin: Integer, end: Integer): String = {
\n
\"
this is scala
\"\n
}
\n
}'
,
NULL
,
'2022-10-25 09:21:32'
,
'2022-10-25 17:49:46'
);
INSERT
INTO
`dlink_udf_template`
(
`id`
,
`name`
,
`code_type`
,
`function_type`
,
`template_code`
,
`enabled`
,
`create_time`
,
`update_time`
)
VALUES
(
4
,
'python_udf_1'
,
'Python'
,
'UDF'
,
'from pyflink.table import ScalarFunction, DataTypes
\n
from pyflink.table.udf import udf
\n\n
class ${className}(ScalarFunction):
\n
def __init__(self):
\n
pass
\n\n
def eval(self, variable):
\n
return str(variable)
\n\n\n
${attr!
\'
f
\'
} = udf(HashCode(), result_type=DataTypes.STRING())'
,
NULL
,
'2022-10-25 09:23:07'
,
'2022-10-25 09:34:01'
);
INSERT
INTO
`dlink_udf_template`
(
`id`
,
`name`
,
`code_type`
,
`function_type`
,
`template_code`
,
`enabled`
,
`create_time`
,
`update_time`
)
VALUES
(
5
,
'python_udf_2'
,
'Python'
,
'UDF'
,
'from pyflink.table import DataTypes
\n
from pyflink.table.udf import udf
\n\n
@udf(result_type=DataTypes.STRING())
\n
def ${className}(variable1:string):
\n
return
\'\'
'
,
NULL
,
'2022-10-25 09:25:13'
,
'2022-10-25 09:34:47'
);
SET
FOREIGN_KEY_CHECKS
=
1
;
pom.xml
View file @
ca7795c1
...
...
@@ -641,7 +641,7 @@
<eclipse>
<file>
style/spotless_dlink_formatter.xml
</file>
</eclipse>
<removeUnusedImports
/>
<removeUnusedImports/>
<importOrder>
<order>
\#,com.dlink,org.apache,java,javassist,javax,org,com,
</order>
</importOrder>
...
...
@@ -678,7 +678,7 @@
<includes>
<include>
**/*.md
</include>
</includes>
<flexmark
/>
<flexmark/>
</markdown>
</configuration>
<executions>
...
...
@@ -693,25 +693,44 @@
</plugins>
</build>
<repositories>
<repository>
<id>
aliyun
</id>
<url>
https://maven.aliyun.com/repository/central
</url>
</repository>
<repository>
<profiles>
<profile>
<id>
maven-central
</id>
<url>
https://repo1.maven.org/maven2/
</url>
</repository>
</repositories>
<activation>
<property>
<name>
maven-central
</name>
</property>
</activation>
<repositories>
<repository>
<id>
maven-central
</id>
<url>
https://repo1.maven.org/maven2/
</url>
</repository>
</repositories>
</profile>
<pluginRepositories>
<pluginRepository>
<profile>
<id>
aliyun
</id>
<url>
https://maven.aliyun.com/repository/central
</url>
</pluginRepository>
</pluginRepositories>
<activation>
<activeByDefault>
true
</activeByDefault>
<property>
<name>
aliyun
</name>
</property>
</activation>
<repositories>
<repository>
<id>
aliyun
</id>
<url>
https://maven.aliyun.com/repository/central
</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>
aliyun
</id>
<url>
https://maven.aliyun.com/repository/central
</url>
</pluginRepository>
</pluginRepositories>
</profile>
<profiles>
<profile>
<id>
web
</id>
<activation>
...
...
@@ -914,7 +933,8 @@
<artifactId>
maven-javadoc-plugin
</artifactId>
<configuration>
<additionalJOptions>
<additionalJOption>
--add-exports=java.base/sun.net.util=ALL-UNNAMED
</additionalJOption>
<additionalJOption>
--add-exports=java.base/sun.net.util=ALL-UNNAMED
</additionalJOption>
</additionalJOptions>
</configuration>
</plugin>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment