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
a1cae846
Commit
a1cae846
authored
Dec 24, 2025
by
fangxingjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
139c5fd6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
dwt_st_mt_christmas_info.py
Pyspark_job/dwt/dwt_st_mt_christmas_info.py
+0
-0
dwt_st_mt_christmas_info.py
Pyspark_job/sqoop_export/dwt_st_mt_christmas_info.py
+31
-0
No files found.
Pyspark_job/dwt/dwt_st_mt_christmas_info.py
0 → 100644
View file @
a1cae846
This diff is collapsed.
Click to expand it.
Pyspark_job/sqoop_export/dwt_st_mt_christmas_info.py
0 → 100644
View file @
a1cae846
import
os
import
sys
sys
.
path
.
append
(
os
.
path
.
dirname
(
sys
.
path
[
0
]))
from
utils.secure_db_client
import
get_remote_engine
engine
=
get_remote_engine
(
site_name
=
"us"
,
# -> database "selection"
db_type
=
"postgresql_cluster"
,
# -> 服务端 alias "mysql"
user
=
"fangxingjun"
,
# -> 服务端 alias "mysql"
user_token
=
"5f1b2e9c3a4d7f60"
# 可不传,走默认
)
site_name
=
'us'
date_type
=
'month_aba_me'
date_info
=
'2025-11'
partitions
=
{
'site_name'
:
site_name
,
'date_type'
:
date_type
,
'date_info'
:
date_info
,
}
cols_list
=
[
'search_term'
,
'total_searched_products'
,
'mt_volume'
,
'st_price_avg'
,
'st_ao_val'
,
'total_amazon_orders_per50'
,
'total_bsr_orders'
,
'total_page3_products'
,
'total_self_products'
,
'total_new_products'
,
'total_orders'
,
'total_amazon_orders'
,
'self_product_rate'
,
'new_product_rate'
,
'created_time'
,
'updated_time'
,
'site_name'
,
'date_type'
,
'date_info'
]
engine
.
sqoop_raw_export
(
hive_table
=
'dwt_st_mt_christmas_info'
,
import_table
=
f
'{site_name}_st_mt_christmas_report_2025'
,
partitions
=
partitions
,
m
=
1
,
cols
=
','
.
join
(
cols_list
)
)
\ No newline at end of file
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