Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
alpha-mind
Project
Project
Details
Activity
Releases
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
Dr.李
alpha-mind
Commits
2ad54dc7
Commit
2ad54dc7
authored
Sep 02, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove some task
parent
2bfe7b2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
41 deletions
+0
-41
update_uqer_data_postgres.py
scripts/update_uqer_data_postgres.py
+0
-41
No files found.
scripts/update_uqer_data_postgres.py
View file @
2ad54dc7
...
@@ -369,39 +369,6 @@ def update_uqer_universe_ashare_ex(ds, **kwargs):
...
@@ -369,39 +369,6 @@ def update_uqer_universe_ashare_ex(ds, **kwargs):
df
.
to_sql
(
Universe
.
__table__
.
name
,
engine
,
index
=
False
,
if_exists
=
'append'
)
df
.
to_sql
(
Universe
.
__table__
.
name
,
engine
,
index
=
False
,
if_exists
=
'append'
)
def
update_uqer_universe_pm500_mirror
(
ds
,
**
kwargs
):
ref_date
,
this_date
=
process_date
(
ds
)
flag
=
check_holiday
(
this_date
)
if
not
flag
:
return
query
=
delete
(
Universe
)
.
where
(
and_
(
Universe
.
trade_date
==
this_date
,
Universe
.
universe
==
'pm500_mirror'
)
)
engine
.
execute
(
query
)
ms_user
=
'sa'
ms_pwd
=
'A12345678!'
db
=
'PortfolioManagements500'
old_engine
=
sqlalchemy
.
create_engine
(
'mssql+pymssql://{0}:{1}@10.63.6.219/{2}?charset=utf8'
.
format
(
ms_user
,
ms_pwd
,
db
))
query
=
"select applyDate trade_date, Code code, 'pm500_mirror' universe from PortfolioManagements500.dbo.StockUniverse "
\
"where applyDate = {date}"
.
format
(
date
=
ref_date
)
df
=
pd
.
read_sql
(
query
,
old_engine
)
if
df
.
empty
:
return
data_info_log
(
df
,
Universe
)
format_data
(
df
)
df
.
to_sql
(
Universe
.
__table__
.
name
,
engine
,
index
=
False
,
if_exists
=
'append'
)
def
update_uqer_index_components
(
ds
,
**
kwargs
):
def
update_uqer_index_components
(
ds
,
**
kwargs
):
ref_date
,
this_date
=
process_date
(
ds
)
ref_date
,
this_date
=
process_date
(
ds
)
flag
=
check_holiday
(
this_date
)
flag
=
check_holiday
(
this_date
)
...
@@ -729,14 +696,6 @@ universe50_task = PythonOperator(
...
@@ -729,14 +696,6 @@ universe50_task = PythonOperator(
dag
=
dag
dag
=
dag
)
)
_
=
PythonOperator
(
task_id
=
'update_uqer_universe_pm500_mirror'
,
provide_context
=
True
,
python_callable
=
update_uqer_universe_pm500_mirror
,
dag
=
dag
)
universe300_task
.
set_upstream
(
index_task
)
universe300_task
.
set_upstream
(
index_task
)
universe500_task
.
set_upstream
(
index_task
)
universe500_task
.
set_upstream
(
index_task
)
universe800_task
.
set_upstream
(
index_task
)
universe800_task
.
set_upstream
(
index_task
)
...
...
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