Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
flink-sql-gateway-task
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiebaofa
flink-sql-gateway-task
Commits
7d01984c
Commit
7d01984c
authored
May 19, 2021
by
xiebaofa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql格式调整
parent
8358145c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
61 deletions
+62
-61
AccountPayKafkaBinlogToHBase.java
src/main/java/com/miya/ali/AccountPayKafkaBinlogToHBase.java
+33
-33
ReturnPayKafkaBinlogToHBase.java
src/main/java/com/miya/ali/ReturnPayKafkaBinlogToHBase.java
+29
-28
No files found.
src/main/java/com/miya/ali/AccountPayKafkaBinlogToHBase.java
View file @
7d01984c
...
@@ -117,39 +117,39 @@ public class AccountPayKafkaBinlogToHBase {
...
@@ -117,39 +117,39 @@ public class AccountPayKafkaBinlogToHBase {
"SELECT "
+
"SELECT "
+
" CONCAT( CAST( (MOD(CAST(DATE_FORMAT(systemdate,'yyyyMMdd') AS INT),10)) AS STRING ) , '~' , DATE_FORMAT(systemdate,'yyyyMMdd'),'~' , out_id) ,"
+
" CONCAT( CAST( (MOD(CAST(DATE_FORMAT(systemdate,'yyyyMMdd') AS INT),10)) AS STRING ) , '~' , DATE_FORMAT(systemdate,'yyyyMMdd'),'~' , out_id) ,"
+
" ROW("
+
" ROW("
+
"saasid ,\n"
+
"
saasid ,\n"
+
"marketid ,\n"
+
"
marketid ,\n"
+
"operator_id ,\n"
+
"
operator_id ,\n"
+
"out_id ,\n"
+
"
out_id ,\n"
+
"paymentplatform ,\n"
+
"
paymentplatform ,\n"
+
"serveicetype ,\n"
+
"
serveicetype ,\n"
+
"total_fee ,\n"
+
"
total_fee ,\n"
+
"status ,\n"
+
"
status ,\n"
+
"trad_desc ,\n"
+
"
trad_desc ,\n"
+
"`date` ,\n"
+
"
`date` ,\n"
+
"systemdate ,\n"
+
"
systemdate ,\n"
+
"fund_bill_list ,\n"
+
"
fund_bill_list ,\n"
+
"buyer_logon_id ,\n"
+
"
buyer_logon_id ,\n"
+
"buyer_user_id ,\n"
+
"
buyer_user_id ,\n"
+
"cashier ,\n"
+
"
cashier ,\n"
+
"seller_id ,\n"
+
"
seller_id ,\n"
+
"trade_no ,\n"
+
"
trade_no ,\n"
+
"is_subscribe ,\n"
+
"
is_subscribe ,\n"
+
"isbalance ,\n"
+
"
isbalance ,\n"
+
"posbatch ,\n"
+
"
posbatch ,\n"
+
"invoiceno ,\n"
+
"
invoiceno ,\n"
+
"deductionfee ,\n"
+
"
deductionfee ,\n"
+
"merchantdiscount ,\n"
+
"
merchantdiscount ,\n"
+
"otherdescount ,\n"
+
"
otherdescount ,\n"
+
"barcode ,\n"
+
"
barcode ,\n"
+
"goodstag ,\n"
+
"
goodstag ,\n"
+
"rds_id ,\n"
+
"
rds_id ,\n"
+
"rds_name ,\n"
+
"
rds_name ,\n"
+
"mqstatus ,\n"
+
"
mqstatus ,\n"
+
"trade_type ,\n"
+
"
trade_type ,\n"
+
"notify_url ,\n"
+
"
notify_url ,\n"
+
"currency ,\n"
+
"
currency ,\n"
+
"settlementid "
+
"
settlementid "
+
" ) FROM ( select * from ( "
;
" ) FROM ( select * from ( "
;
stringBuilder
.
append
(
CREATE_JOB_SQL
).
append
(
"select * from "
+
RDS_LIST
.
get
(
0
).
replace
(
'-'
,
'_'
)
);
stringBuilder
.
append
(
CREATE_JOB_SQL
).
append
(
"select * from "
+
RDS_LIST
.
get
(
0
).
replace
(
'-'
,
'_'
)
);
...
...
src/main/java/com/miya/ali/ReturnPayKafkaBinlogToHBase.java
View file @
7d01984c
...
@@ -62,7 +62,8 @@ public class ReturnPayKafkaBinlogToHBase {
...
@@ -62,7 +62,8 @@ public class ReturnPayKafkaBinlogToHBase {
public
static
String
createSinkSql
(){
public
static
String
createSinkSql
(){
String
CREATE_SINK_SQL
=
"CREATE TABLE huawei_hbase_sink_table (\n"
+
String
CREATE_SINK_SQL
=
"CREATE TABLE huawei_hbase_sink_table (\n"
+
" rowkey STRING,\n"
+
" rowkey STRING,\n"
+
" f ROW<saasid STRING,\n"
+
" f ROW<"
+
" saasid STRING,\n"
+
" marketid STRING ,\n"
+
" marketid STRING ,\n"
+
" operator_id STRING ,\n"
+
" operator_id STRING ,\n"
+
" out_id STRING ,\n"
+
" out_id STRING ,\n"
+
...
@@ -73,7 +74,7 @@ public class ReturnPayKafkaBinlogToHBase {
...
@@ -73,7 +74,7 @@ public class ReturnPayKafkaBinlogToHBase {
" status STRING ,\n"
+
" status STRING ,\n"
+
" trad_desc STRING ,\n"
+
" trad_desc STRING ,\n"
+
" `date` STRING ,\n"
+
" `date` STRING ,\n"
+
"
miyadate STRING
,\n"
+
"
miyadate STRING
,\n"
+
" retotal_fee STRING ,\n"
+
" retotal_fee STRING ,\n"
+
" cashier STRING ,\n"
+
" cashier STRING ,\n"
+
" posbatch STRING ,\n"
+
" posbatch STRING ,\n"
+
...
...
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