Commit 7d01984c authored by xiebaofa's avatar xiebaofa

sql格式调整

parent 8358145c
...@@ -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('-','_') );
......
...@@ -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" +
......
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