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
Hide 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,34 +62,35 @@ public class ReturnPayKafkaBinlogToHBase {
...
@@ -62,34 +62,35 @@ 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<"
+
" marketid STRING ,\n"
+
" saasid STRING,\n"
+
" operator_id STRING ,\n"
+
" marketid STRING ,\n"
+
" out_id STRING ,\n"
+
" operator_id STRING ,\n"
+
" out_request_no STRING ,\n"
+
" out_id STRING ,\n"
+
" paymentplatform STRING ,\n"
+
" out_request_no STRING ,\n"
+
" serveicetype STRING ,\n"
+
" paymentplatform STRING ,\n"
+
" total_fee STRING ,\n"
+
" serveicetype STRING ,\n"
+
" status STRING ,\n"
+
" total_fee STRING ,\n"
+
" trad_desc STRING ,\n"
+
" status STRING ,\n"
+
" `date` STRING ,\n"
+
" trad_desc STRING ,\n"
+
" miyadate STRING,\n"
+
" `date` STRING ,\n"
+
" retotal_fee STRING ,\n"
+
" miyadate STRING ,\n"
+
" cashier STRING ,\n"
+
" retotal_fee STRING ,\n"
+
" posbatch STRING ,\n"
+
" cashier STRING ,\n"
+
" invoiceno STRING ,\n"
+
" posbatch STRING ,\n"
+
" fundbilllist STRING ,\n"
+
" invoiceno STRING ,\n"
+
" seller_id STRING ,\n"
+
" fundbilllist STRING ,\n"
+
" trade_no STRING ,\n"
+
" seller_id STRING ,\n"
+
" orderfee STRING ,\n"
+
" trade_no STRING ,\n"
+
" rds_id STRING ,\n"
+
" orderfee STRING ,\n"
+
" rds_name STRING ,\n"
+
" rds_id STRING ,\n"
+
" currency STRING ,\n"
+
" rds_name STRING ,\n"
+
" settlementid STRING ,\n"
+
" currency STRING ,\n"
+
" trade_type STRING ,\n"
+
" settlementid STRING ,\n"
+
" deductionfee STRING ,\n"
+
" trade_type STRING ,\n"
+
" merchantdiscount STRING ,\n"
+
" deductionfee STRING ,\n"
+
" otherdescount STRING >,\n"
+
" merchantdiscount STRING ,\n"
+
" otherdescount STRING >,\n"
+
" PRIMARY KEY (rowkey) NOT ENFORCED\n"
+
" PRIMARY KEY (rowkey) NOT ENFORCED\n"
+
") WITH (\n"
+
") WITH (\n"
+
" 'connector' = 'hbase-2.2',\n"
+
" 'connector' = 'hbase-2.2',\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