-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
89 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
echo "Updating index weight" | ||
startdate=$(dolt sql -q "select DATE_FORMAT(DATE_ADD(max(trade_date), INTERVAL 1 DAY), '%Y%m%d') from ts_index_weight" -r csv | tail -1) | ||
python3 tushare/dump_index_weight.py --start_date=$startdate | ||
for file in $(ls tushare/index_weight/); | ||
do | ||
dolt table import -u ts_index_weight tushare/index/$file; | ||
done | ||
|
||
echo "Updating index price" | ||
python3 tushare/dump_index_eod_price.py | ||
for file in $(ls tushare/index/); | ||
do | ||
dolt table import -u ts_a_stock_eod_price tushare/index/$file; | ||
done | ||
|
||
echo "Updating stock price" | ||
dolt sql-server & | ||
python3 tushare/update_a_stock_eod_price_to_latest.py | ||
killall dolt | ||
|
||
dolt sql --file ./tushare/regular_update.sql | ||
|
||
dolt add -A | ||
|
||
dolt commit -m "Daily update" | ||
|
||
dolt push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters