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,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" +
......
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