tieke1121 commented on issue #4223:
URL: https://github.com/apache/hudi/issues/4223#issuecomment-986481274
ingestion.sql
--start[accesscard_dynamicaccountinfo]
SELECT id AS uuid, id_old, id_base, account_id, dynamic_date
, comsume_no, dynamic_sum, beforedynamic_sum, afterdynamic_sum,
dynamicacc_id
, dynamicacc_name, borrow_account_type, borrow_accountid,
borrow_accountname, card_id
, vehicle_plate, borrow_openaccountbankno,
borrow_openaccountbankname, borrow_organizationno, loan_account_type
, loan_accountid, loan_accountname, loan_openaccountbankno,
loan_openaccountbankname, loan_organizationno
, billing_id, charge_channelid, charge_channel, charge_pathid,
charge_path
, platform_resultcode, platform_resultmsg, charge_result,
deal_userid, deal_username
, charge_desc, consume_time, create_time, update_time,
check_time,create_time AS ts,DATE_FORMAT(create_time, 'yyyy-MM-dd') AS pt
FROM accesscard_dynamicaccountinfo_temp;
CREATE TABLE `accesscard_dynamicaccountinfo`(
`uuid` bigint,
`id_old` varchar(50),
`id_base` bigint,
`account_id` bigint,
`dynamic_date` TIMESTAMP(3),
`comsume_no` varchar(100),
`dynamic_sum` decimal(16,4),
`beforedynamic_sum` decimal(16,4),
`afterdynamic_sum` decimal(16,4),
`dynamicacc_id` varchar(50),
`dynamicacc_name` varchar(50),
`borrow_account_type` int,
`borrow_accountid` varchar(32),
`borrow_accountname` varchar(50),
`card_id` bigint,
`vehicle_plate` varchar(20),
`borrow_openaccountbankno` varchar(50),
`borrow_openaccountbankname` varchar(50),
`borrow_organizationno` varchar(50),
`loan_account_type` int,
`loan_accountid` varchar(50),
`loan_accountname` varchar(50),
`loan_openaccountbankno` varchar(50),
`loan_openaccountbankname` varchar(50),
`loan_organizationno` varchar(50),
`billing_id` varchar(500),
`charge_channelid` varchar(50),
`charge_channel` varchar(50),
`charge_pathid` varchar(50),
`charge_path` varchar(50),
`platform_resultcode` varchar(10),
`platform_resultmsg` varchar(100),
`charge_result` varchar(50),
`deal_userid` bigint,
`deal_username` varchar(50),
`charge_desc` varchar(100),
`consume_time` TIMESTAMP(3),
`create_time` TIMESTAMP(3),
`update_time` TIMESTAMP(3),
`check_time` TIMESTAMP(3),
`ts` TIMESTAMP(3),
`pt` varchar(20)
)
PARTITIONED BY (`pt`)
WITH (
'connector' = 'hudi',
'path' = 'hdfs://tslaver5:8020/data/hudi/accesscard_dynamicaccountinfo',
'table.type' = 'MERGE_ON_READ',
'hive_sync.enable' = 'true',
'hive_sync.mode' = 'hms' ,
'hive_sync.metastore.uris' = 'thrift://tmaster:9083',
'hive_sync.jdbc_url'='jdbc:hive2://tslaver5:10000',
'hive_sync.table'='accesscard_dynamicaccountinfo',
'hive_sync.db'='ods',
'hive_sync.username'='',
'hive_sync.password'='',
'read.tasks'='3',
'write.bucket_assign.tasks'='3',
'write.tasks'='3',
'write.index_bootstrap.tasks'='2',
'compaction.tasks'='2'
);
--start[accesscard_entityaccount]
SELECT id AS uuid, id_old, id_base, etc_channel, status
, account_name, account_pwd, is_message_tip, owner_type, account_type
, relation_name, linkman_gender, birthday, certifi_type, certifi_lic
, phone_no, address, post_code, email, mobile
, fax_no, transactor, trans_cer_type, trans_cer_no, transcer_phone_no
, transcer_mobile, creater, creater_old, balance, dot_id
, dot_id_old, dot_name, user_id, user_id_old, user_name
, parent_id, parent_id_old, dept_id, dept_name, real_name
, referee, org_id, org_id_old, org_name, trace_no
, refund_status, is_white_list, delay_doblack_def, verifystate,
protocolstate
, create_time, update_time, invoice_mobile, organization_name,
version,create_time AS ts,DATE_FORMAT(create_time, 'yyyy-MM-dd') AS pt
FROM accesscard_entityaccount_temp;
CREATE TABLE `accesscard_entityaccount` (
`uuid` bigint,
`id_old` varchar(32),
`id_base` bigint,
`etc_channel` varchar(10),
`status` int,
`account_name` varchar(300),
`account_pwd` varchar(255),
`is_message_tip` int,
`owner_type` int,
`account_type` int,
`relation_name` varchar(255),
`linkman_gender` int,
`birthday` varchar(255),
`certifi_type` varchar(50),
`certifi_lic` varchar(50),
`phone_no` varchar(20),
`address` varchar(255),
`post_code` varchar(10),
`email` varchar(100),
`mobile` varchar(20),
`fax_no` varchar(20),
`transactor` varchar(20),
`trans_cer_type` int,
`trans_cer_no` varchar(50),
`transcer_phone_no` varchar(20),
`transcer_mobile` varchar(20),
`creater` bigint,
`creater_old` varchar(32),
`balance` decimal(16,4),
`dot_id` varchar(255),
`dot_id_old` varchar(255),
`dot_name` varchar(200),
`user_id` bigint,
`user_id_old` varchar(32),
`user_name` varchar(50),
`parent_id` bigint,
`parent_id_old` varchar(32),
`dept_id` bigint,
`dept_name` varchar(50),
`real_name` varchar(50),
`referee` varchar(50),
`org_id` bigint,
`org_id_old` varchar(32),
`org_name` varchar(100),
`trace_no` varchar(50),
`refund_status` int,
`is_white_list` varchar(2),
`delay_doblack_def` int,
`verifystate` varchar(50),
`protocolstate` varchar(50),
`create_time` TIMESTAMP(3),
`update_time` TIMESTAMP(3),
`invoice_mobile` varchar(20),
`organization_name` varchar(100),
`version` bigint,
`ts` TIMESTAMP(3),
`pt` varchar(20)
)
PARTITIONED BY (`pt`)
WITH (
'connector' = 'hudi',
'path' = 'hdfs://tslaver5:8020/data/hudi/accesscard_entityaccount',
'table.type' = 'MERGE_ON_READ',
'hive_sync.enable' = 'true',
'hive_sync.mode' = 'hms' ,
'hive_sync.metastore.uris' = 'thrift://tmaster:9083',
'hive_sync.jdbc_url'='jdbc:hive2://tslaver5:10000',
'hive_sync.table'='accesscard_entityaccount',
'hive_sync.db'='ods',
'hive_sync.username'='',
'hive_sync.password'='',
'read.tasks'='3',
'write.bucket_assign.tasks'='3',
'write.tasks'='3',
'write.index_bootstrap.tasks'='2',
'compaction.tasks'='2'
);
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]