Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gy_shell
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李辅翼
gy_shell
Commits
1fe792ee
Commit
1fe792ee
authored
Oct 24, 2019
by
李辅翼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导数据
parent
e92d2f9c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
2 deletions
+46
-2
信用分相关/2mysql/day/overview.txt
+36
-0
信用分相关/2mysql/month/overview.txt
+8
-0
信用分相关/建表语句/脚本.txt
+2
-2
No files found.
信用分相关/2mysql/day/overview.txt
0 → 100644
View file @
1fe792ee
#!/bin/bash
#!/bin/bash
##credit_score_record
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop export --connect jdbc:mysql://172.16.25.43:3306/db_base_service --username root --password 'mysql!@Hik' -m 1 --table credit_score_record_1023 --input-fields-terminated-by "\t" --input-lines-terminated-by "\n" --update-key "id_card,month_evaluate,data_type" --update-mode allowinsert --input-null-string '\\N' --input-null-non-string '\\N' --columns "id_card, gmt_evaluate, month_evaluate, credit_hide_score, credit_display_score, credit_big_level_code, credit_small_level_code, credit_score_rate, increase_score, deduction_score, traffic_compliance, safe_driving, base_info, civilized_activity, credit_compliance, credit_display_score_rank, credit_hide_score_rank, credit_hide_score_rate,data_type" --export-dir /app/credit/credit_score_record/
##credit_radar
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop export --connect jdbc:mysql://172.16.25.43:3306/db_gy_dmsmp --username root --password 'mysql!@Hik' -m 1 --table credit_radar_1023 --input-fields-terminated-by "\t" --input-lines-terminated-by "\n" --update-key "date_time,indicator_type,data_type" --update-mode allowinsert --input-null-string '\\N' --input-null-non-string '\\N' --columns "indicator_type, indicator_name, indicator_score, date_time,update_time,data_type" --export-dir /app/traffic/credit_radar/
##credit_change_analysis
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop export --connect jdbc:mysql://172.16.25.43:3306/db_gy_dmsmp --username root --password 'mysql!@Hik' -m 1 --table credit_change_analysis_1023 --input-fields-terminated-by "\t" --input-lines-terminated-by "\n" --update-key "item_name,date_time,data_type" --update-mode allowinsert --input-null-string '\\N' --input-null-non-string '\\N' --columns "item_name, item_type, num, date_time, dimension, update_time, data_type" --export-dir /app/traffic/credit_change_analysis_day/
##credit_total
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop export --connect jdbc:mysql://172.16.25.43:3306/db_gy_dmsmp --username root --password 'mysql!@Hik' -m 1 --table credit_total_1023 --input-fields-terminated-by "\t" --input-lines-terminated-by "\n" --update-key "item_name,date_time,data_type" --update-mode allowinsert --input-null-string '\\N' --input-null-non-string '\\N' --columns "date_time, total_driver_hb, total_driver_tb, total_driver, add_driver, add_driver_tb, add_driver_hb, add_blacklist, add_blacklist_hb,add_blacklist_tb, active_total_user, active_total_user_hb, active_total_user_tb, active_black_user, active_black_user_hb, active_black_user_tb,blacklist, blacklist_hb, blacklist_tb,update_time" --export-dir /app/traffic/credit_total/
##credit_activate_stat
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop export --connect jdbc:mysql://172.16.25.43:3306/db_gy_dmsmp --username root --password 'mysql!@Hik' -m 1 --table credit_activate_stat --input-fields-terminated-by "\t" --input-lines-terminated-by "\n" --update-key "date_time" --update-mode allowinsert --input-null-string '\\N' --input-null-non-string '\\N' --columns "total_driver, add_driver,date_time,update_time" --export-dir /app/traffic/credit_activate_stat/
信用分相关/2mysql/month/overview.txt
0 → 100644
View file @
1fe792ee
##credit_month_average
##credit_month_average
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop export --connect jdbc:mysql://172.16.25.43:3306/db_gy_dmsmp --username root --password 'mysql!@Hik' -m 1 --table credit_month_average_1023 --input-fields-terminated-by "\t" --input-lines-terminated-by "\n" --update-key "date_month,data_type" --update-mode allowinsert --input-null-string '\\N' --input-null-non-string '\\N' --columns "date_month, avg_credit, update_time, data_type" --export-dir /app/traffic/credit_month_average_month_all/
##credit_level_analysis
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop export --connect jdbc:mysql://172.16.25.43:3306/db_gy_dmsmp --username root --password 'mysql!@Hik' -m 1 --table credit_level_analysis_1023 --input-fields-terminated-by "\t" --input-lines-terminated-by "\n" --update-key "credit_type,date_time,data_type" --update-mode allowinsert --input-null-string '\\N' --input-null-non-string '\\N' --columns "credit_type, credit_name, type_count, date_time, update_time, data_type" --export-dir /app/traffic/credit_level_analysis_all/
信用分相关/建表语句/脚本.txt
View file @
1fe792ee
--cre
dit_activate_stat天表
--cre
dit_activate_stat天表
...
...
@@ -81,7 +81,7 @@ app.total_black_hiscount a1 inner join app.total_black_hiscount b1 on a1.date_ti
(
select a2.date_time date_time,round((a2.add_num-b2.add_num)/b2.add_num,6)*100 as blacklist_tb from
app.total_black_hiscount a2 inner join app.total_black_hiscount b2 on a2.date_time= date_add(b2.date_time,30)
)n on (m.date_time=n.date_time) order by date_time desc
)n on (m.date_time=n.date_time) order by date_time desc
;
--app.credit_total :信用数据总计表
INSERT OVERWRITE table app.credit_total
SELECT a.date_time,a.total_driver_hb,a.total_driver_tb,a.total_driver_driver,a.add_driver,a.add_driver_tb,a.add_blacklist_hb,a.add_blacklist,a.add_blacklist_hb,a.add_blacklist_tb,
...
...
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