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
823e7cbc
Commit
823e7cbc
authored
Apr 13, 2026
by
hejiangming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
682eb72a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
0 deletions
+1
-0
dwd_bsr_nsr_asin_rank_day.py
Pyspark_job/sqoop_export/dwd_bsr_nsr_asin_rank_day.py
+1
-0
No files found.
Pyspark_job/sqoop_export/dwd_bsr_nsr_asin_rank_day.py
View file @
823e7cbc
...
...
@@ -34,6 +34,7 @@ if __name__ == '__main__':
engine
=
DBUtil
.
get_db_engine
(
db_type
,
site_name
)
# 根据主表 复制结构 创建天的子表 day_flag 是一个自动计算列,由 is_1_day_flag + is_7_day_flag + is_30_day_flag
DBUtil
.
engine_exec_sql
(
engine
,
f
"""
drop table if exists {export_tb};
create table {export_tb} ( like {export_master_tb} including defaults including constraints );
alter table {export_tb} drop if exists day_flag ;
alter table {export_tb} add column day_flag varchar(10) generated always as (is_1_day_flag + is_7_day_flag + is_30_day_flag) stored;
...
...
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