Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Amazon-Selection-Data
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abel_cjy
Amazon-Selection-Data
Commits
fa8a7fbb
Commit
fa8a7fbb
authored
Sep 05, 2025
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ABA主题标签优化
parent
63a52979
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
dwt_st_theme_agg.py
Pyspark_job/dwt/dwt_st_theme_agg.py
+0
-0
dwt_st_theme_agg.py
Pyspark_job/sqoop_export/dwt_st_theme_agg.py
+10
-9
No files found.
Pyspark_job/dwt/dwt_st_theme_agg.py
View file @
fa8a7fbb
This diff is collapsed.
Click to expand it.
Pyspark_job/sqoop_export/dwt_st_theme_agg.py
View file @
fa8a7fbb
import
os
import
sys
import
random
import
string
sys
.
path
.
append
(
os
.
path
.
dirname
(
sys
.
path
[
0
]))
from
utils.db_util
import
DBUtil
from
utils.ssh_util
import
SSHUtil
from
utils.common_util
import
CommonUtil
,
DateTypes
from
utils.common_util
import
CommonUtil
if
__name__
==
'__main__'
:
site_name
=
CommonUtil
.
get_sys_arg
(
1
,
None
)
date_type
=
CommonUtil
.
get_sys_arg
(
2
,
None
)
date_info
=
CommonUtil
.
get_sys_arg
(
3
,
None
)
# 获取最后一个参数
test_flag
=
CommonUtil
.
get_sys_arg
(
len
(
sys
.
argv
)
-
1
,
None
)
print
(
f
"执行参数为{sys.argv}"
)
...
...
@@ -22,8 +20,6 @@ if __name__ == '__main__':
db_type
=
'postgresql_test'
print
(
"导出到测试库中"
)
else
:
# db_type = "postgresql"
# print("导出到PG库中")
db_type
=
"postgresql_cluster"
print
(
"导出到PG集群库库中"
)
...
...
@@ -40,8 +36,7 @@ if __name__ == '__main__':
# 保证幂等性,先删除原始表同周期的数据
sql
=
f
"""
drop table if exists {export_tb};
create table if not exists {export_tb}
(
create table if not exists {export_tb} (
like {export_master_tb} including ALL
);
"""
...
...
@@ -67,7 +62,13 @@ if __name__ == '__main__':
"pattern_num_rate"
,
"date_info"
,
"created_time"
,
"updated_time"
"updated_time"
,
"pattern_word_num"
,
"pattern_category_id"
,
"pattern_category_current_id"
,
"pattern_rank"
,
"pattern_rank_change_rate"
,
"pattern_rank_rate_of_change"
],
partition_dict
=
{
"site_name"
:
site_name
,
...
...
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