Ejemplo n.º 1
0
try:
    sys.path.append(os.getcwd()[:os.getcwd().index("SCRIPT")])
except:
    pass

import datetime as dt
from dateutil.relativedelta import relativedelta
from utils.database import config as cfg
from utils.synckit.cli import tools
from utils.synckit.mysqlreader import splitter

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_4119PRODUCT = cfg.load_engine()["4Gp"]

tasks = [
    (splitter.MysqlReader("fund_info", ENGINE_RD),
     splitter.MysqlReader("fund_info", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_asset_scale", ENGINE_RD),
     splitter.MysqlReader("fund_asset_scale", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_allocation_data", ENGINE_RD),
     splitter.MysqlReader("fund_allocation_data", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_fee_data", ENGINE_RD),
     splitter.MysqlReader("fund_fee_data", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_manager_mapping", ENGINE_RD),
     splitter.MysqlReader("fund_manager_mapping", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_org_mapping", ENGINE_RD),
     splitter.MysqlReader("fund_org_mapping", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_portfolio", ENGINE_RD),
     splitter.MysqlReader("fund_portfolio", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_security_data", ENGINE_RD),
     splitter.MysqlReader("fund_security_data", ENGINE_4119PRODUCT)),
Ejemplo n.º 2
0
import datetime as dt
from dateutil.relativedelta import relativedelta
from sqlalchemy import create_engine
from utils.synckit.cli import tools
from utils.synckit.mysqlreader import splitter

ENGINE_RD = create_engine(
    "mysql+pymysql://jr_sync_yu:[email protected]:4171/base_public",
    connect_args={"charset": "utf8"})
ENGINE_4119PRODUCT_MUTUAL = create_engine(
    "mysql+pymysql://jr_sync_yu:[email protected]:4119/product_mutual",
    connect_args={"charset": "utf8"})

tasks = [
    (splitter.MysqlReader("fund_dividend", ENGINE_RD),
     splitter.MysqlReader("fund_dividend", ENGINE_4119PRODUCT_MUTUAL)),
    (splitter.MysqlReader("fund_split", ENGINE_RD),
     splitter.MysqlReader("fund_split", ENGINE_4119PRODUCT_MUTUAL)),
    (splitter.MysqlReader("fund_dividend_split", ENGINE_RD),
     splitter.MysqlReader("fund_dividend_split", ENGINE_4119PRODUCT_MUTUAL)),
    (splitter.MysqlReader("fund_nv", ENGINE_RD),
     splitter.MysqlReader("fund_nv", ENGINE_4119PRODUCT_MUTUAL)),
    (splitter.MysqlReader("fund_yield", ENGINE_RD),
     splitter.MysqlReader("fund_yield", ENGINE_4119PRODUCT_MUTUAL)),
    (splitter.MysqlReader("fund_nv_source", ENGINE_RD),
     splitter.MysqlReader("fund_nv_source", ENGINE_4119PRODUCT_MUTUAL)),
    (splitter.MysqlReader("fund_daily_return", ENGINE_RD),
     splitter.MysqlReader("fund_daily_return", ENGINE_4119PRODUCT_MUTUAL)),
    (splitter.MysqlReader("fund_daily_risk", ENGINE_RD),
     splitter.MysqlReader("fund_daily_risk", ENGINE_4119PRODUCT_MUTUAL)),
Ejemplo n.º 3
0
import datetime as dt
from dateutil.relativedelta import relativedelta
from sqlalchemy import create_engine
from utils.synckit.mysqlreader import splitter
from utils.synckit.cli import tools

ENGINE_RD = create_engine(
    "mysql+pymysql://jr_sync_yu:[email protected]:4171/base_public",
    connect_args={"charset": "utf8"})
ENGINE_4119PRODUCT = create_engine(
    "mysql+pymysql://jr_sync_yu:[email protected]:4119/product_mutual",
    connect_args={"charset": "utf8"})

tasks = [
    (splitter.MysqlReader("fund_asset_scale", ENGINE_RD),
     splitter.MysqlReader("fund_asset_scale", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_balance", ENGINE_RD),
     splitter.MysqlReader("fund_balance", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_description", ENGINE_RD),
     splitter.MysqlReader("fund_description", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_fee", ENGINE_RD),
     splitter.MysqlReader("fund_fee", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_holder", ENGINE_RD),
     splitter.MysqlReader("fund_holder", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_income", ENGINE_RD),
     splitter.MysqlReader("fund_income", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_info", ENGINE_RD),
     splitter.MysqlReader("fund_info", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_info_structured", ENGINE_RD),
     splitter.MysqlReader("fund_info_structured", ENGINE_4119PRODUCT)),
Ejemplo n.º 4
0
try:
    sys.path.append(os.getcwd()[:os.getcwd().index("SCRIPT")])
except:
    pass

import datetime as dt
from dateutil.relativedelta import relativedelta
from utils.database import config as cfg
from utils.synckit.cli import tools
from utils.synckit.mysqlreader import splitter

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_4119PRODUCT = cfg.load_engine()["4Gp"]

tasks = [
    (splitter.MysqlReader("person_info", ENGINE_RD),
     splitter.MysqlReader("person_info", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("person_description", ENGINE_RD),
     splitter.MysqlReader("person_description", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("market_index", ENGINE_RD),
     splitter.MysqlReader("market_index", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("org_executive_info", ENGINE_RD),
     splitter.MysqlReader("org_executive_info", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("org_info", ENGINE_RD),
     splitter.MysqlReader("org_info", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("org_integrity", ENGINE_RD),
     splitter.MysqlReader("org_integrity", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_nv_standard_w", ENGINE_RD), splitter.MysqlReader("fund_nv_standard_w", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_nv_standard_m", ENGINE_RD), splitter.MysqlReader("fund_nv_standard_m", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_nv_data_standard", ENGINE_RD), splitter.MysqlReader("fund_nv_data_standard", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_nv_data_source", ENGINE_RD), splitter.MysqlReader("fund_nv_data_source", ENGINE_4119PRODUCT)),
Ejemplo n.º 5
0
    # (splitter.MysqlReader("fund_allocation_data", ENGINE_RD), splitter.MysqlReader("fund_allocation_data", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_fee_data", ENGINE_RD), splitter.MysqlReader("fund_fee_data", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_manager_mapping", ENGINE_RD), splitter.MysqlReader("fund_manager_mapping", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_month_index_static", ENGINE_RD), splitter.MysqlReader("fund_month_index", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_org_mapping", ENGINE_RD), splitter.MysqlReader("fund_org_mapping", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_portfolio", ENGINE_RD), splitter.MysqlReader("fund_portfolio", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_security_data", ENGINE_RD), splitter.MysqlReader("fund_security_data", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_type_mapping", ENGINE_RD), splitter.MysqlReader("fund_type_mapping", ENGINE_8612GT)),
    # (splitter.MysqlReader("manager_info", ENGINE_RD), splitter.MysqlReader("manager_info", ENGINE_8612GT)),
    # (splitter.MysqlReader("manager_resume", ENGINE_RD), splitter.MysqlReader("manager_resume", ENGINE_8612GT)),
    # (splitter.MysqlReader("market_index", ENGINE_RD), splitter.MysqlReader("market_index", ENGINE_8612GT)),
    # (splitter.MysqlReader("market_info", ENGINE_RD), splitter.MysqlReader("market_info", ENGINE_8612GT)),
    # (splitter.MysqlReader("org_executive_info", ENGINE_RD), splitter.MysqlReader("org_executive_info", ENGINE_8612GT)),
    # (splitter.MysqlReader("org_info", ENGINE_RD), splitter.MysqlReader("org_info", ENGINE_8612GT)),
    # (splitter.MysqlReader("org_integrity", ENGINE_RD), splitter.MysqlReader("org_integrity", ENGINE_8612GT)),
    (splitter.MysqlReader("security_price", ENGINE_RD),
     splitter.MysqlReader("security_price", ENGINE_8612GT)),
    # (splitter.MysqlReader("sws_index", ENGINE_RD), splitter.MysqlReader("sws_index", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_nv_data_standard", ENGINE_RD), splitter.MysqlReader("fund_nv_data", ENGINE_8612GT))
]


def sync(t0, t1):
    NOT_SYNC_PRODUCT = (
        # 雷根
        'JR006559',
        'JR006560',
        'JR006602',
        'JR010118',
        'JR013757',
        'JR015022',
Ejemplo n.º 6
0
    pass

import datetime as dt
from dateutil.relativedelta import relativedelta
from utils.database import config as cfg
from utils.synckit.cli import tools
from utils.synckit.mysqlreader import splitter


ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_4119PRODUCT = cfg.load_engine()["4Gp"]


tasks = [

    (splitter.MysqlReader("fund_weekly_return", ENGINE_RD), splitter.MysqlReader("fund_weekly_return", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_weekly_risk", ENGINE_RD), splitter.MysqlReader("fund_weekly_risk", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_weekly_risk2", ENGINE_RD), splitter.MysqlReader("fund_weekly_risk2", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_subsidiary_weekly_index", ENGINE_RD), splitter.MysqlReader("fund_weekly_risk", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_subsidiary_weekly_index2", ENGINE_RD), splitter.MysqlReader("fund_weekly_subsidiary", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_subsidiary_weekly_index3", ENGINE_RD), splitter.MysqlReader("fund_weekly_subsidiary2", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_month_return", ENGINE_RD), splitter.MysqlReader("fund_month_return", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_month_risk", ENGINE_RD), splitter.MysqlReader("fund_month_risk", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_month_risk2", ENGINE_RD), splitter.MysqlReader("fund_month_risk2", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_subsidiary_month_index", ENGINE_RD), splitter.MysqlReader("fund_month_risk", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_subsidiary_month_index2", ENGINE_RD), splitter.MysqlReader("fund_month_subsidiary", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_subsidiary_month_index3", ENGINE_RD), splitter.MysqlReader("fund_month_subsidiary2", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_rank", ENGINE_RD), splitter.MysqlReader("fund_rank", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_nv_data_standard", ENGINE_RD), splitter.MysqlReader("fund_nv_data_standard", ENGINE_4119PRODUCT)),
]
Ejemplo n.º 7
0
from sqlalchemy import create_engine
from utils.database import config as cfg
from utils.synckit.core import common
from utils.synckit.mysqlreader import splitter
from dateutil.relativedelta import relativedelta
reload(splitter)
reload(common)

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_8612GT = create_engine(
    "mysql+pymysql://jr_sync_yu:[email protected]:8612/test_subsidiary",
    pool_size=50,
    connect_args={"charset": "utf8"})

tasks = [
    (splitter.MysqlReader("index_monthly_return", ENGINE_RD),
     splitter.MysqlReader("index_monthly_return", ENGINE_8612GT)),
    (splitter.MysqlReader("index_monthly_risk", ENGINE_RD),
     splitter.MysqlReader("index_monthly_risk", ENGINE_8612GT)),
    (splitter.MysqlReader("index_monthly_subsidiary", ENGINE_RD),
     splitter.MysqlReader("index_monthly_subsidiary", ENGINE_8612GT)),
    (splitter.MysqlReader("index_weekly_return", ENGINE_RD),
     splitter.MysqlReader("index_weekly_return", ENGINE_8612GT)),
    (splitter.MysqlReader("index_weekly_risk", ENGINE_RD),
     splitter.MysqlReader("index_weekly_risk", ENGINE_8612GT)),
    (splitter.MysqlReader("index_weekly_subsidiary", ENGINE_RD),
     splitter.MysqlReader("index_weekly_subsidiary", ENGINE_8612GT)),
    (splitter.MysqlReader("market_index", ENGINE_RD),
     splitter.MysqlReader("market_index", ENGINE_8612GT)),
    (splitter.MysqlReader("security_price", ENGINE_RD),
     splitter.MysqlReader("security_price", ENGINE_8612GT)),
Ejemplo n.º 8
0
import datetime as dt
from dateutil.relativedelta import relativedelta
from utils.database import config as cfg
from utils.synckit.mysqlreader import splitter
from utils.synckit.cli import tools

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_8612GT = cfg.load_engine()["8612test_sync"]

tasks = [
    # (splitter.MysqlReader("fund_info", ENGINE_RD), splitter.MysqlReader("fund_info", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_info_aggregation", ENGINE_RD), splitter.MysqlReader("fund_info_aggregation", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_asset_scale", ENGINE_RD), splitter.MysqlReader("fund_asset_scale", ENGINE_8612GT)),
    # (splitter.MysqlReader("fund_allocation_data", ENGINE_RD), splitter.MysqlReader("fund_allocation_data", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_fee_data", ENGINE_RD),
     splitter.MysqlReader("fund_fee_data", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_month_index_static", ENGINE_RD),
     splitter.MysqlReader("fund_month_index", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_org_mapping", ENGINE_RD),
     splitter.MysqlReader("fund_org_mapping", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_portfolio", ENGINE_RD),
     splitter.MysqlReader("fund_portfolio", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_security_data", ENGINE_RD),
     splitter.MysqlReader("fund_security_data", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_type_mapping", ENGINE_RD),
     splitter.MysqlReader("fund_type_mapping", ENGINE_8612GT)),
    (splitter.MysqlReader("person_info", ENGINE_RD),
     splitter.MysqlReader("person_info", ENGINE_8612GT)),
    (splitter.MysqlReader("person_description", ENGINE_RD),
     splitter.MysqlReader("person_description", ENGINE_8612GT)),
Ejemplo n.º 9
0
    sys.path.append(os.getcwd()[:os.getcwd().index("SCRIPT")])
except:
    pass

import datetime as dt
from dateutil.relativedelta import relativedelta
from utils.database import config as cfg
from utils.synckit.mysqlreader import splitter
from utils.synckit.cli import tools

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_8612GT = cfg.load_engine()["8612test_sync"]

tasks = [

    (splitter.MysqlReader("fund_weekly_return", ENGINE_RD), splitter.MysqlReader("fund_weekly_return", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_weekly_risk", ENGINE_RD), splitter.MysqlReader("fund_weekly_risk", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_weekly_risk2", ENGINE_RD), splitter.MysqlReader("fund_weekly_risk2", ENGINE_8612GT)),

]


def sync(t0, t1):
    NOT_SYNC_PRODUCT = (
        # 雷根
        'JR006559', 'JR006560', 'JR006602', 'JR010118', 'JR013757', 'JR015022', 'JR018212', 'JR025431',
        'JR027002', 'JR028121', 'JR031510', 'JR033010', 'JR034849', 'JR040097', 'JR058358', 'JR058516',
        'JR065039', 'JR070143', 'JR078235', 'JR087376', 'JR100709', 'JR100710', 'JR100711', 'JR102591',
        'JR103119', 'JR103556', 'JR103755', 'JR103939', 'JR105422', 'JR106452', 'JR109261', 'JR113887',
        'JR114298', 'JR115117', 'JR122835', 'JR122945', 'JR123264', 'JR126054', 'JR126094', 'JR126880',
        'JR131987', 'JR134330', 'JR134488', 'JR134505', 'JR134507', 'JR134515', 'JR135170', 'JR136217',
Ejemplo n.º 10
0
from sqlalchemy import create_engine
from utils.database import config as cfg
from utils.synckit.core import common
from utils.synckit.mysqlreader import splitter
from dateutil.relativedelta import relativedelta

reload(splitter)
reload(common)

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_4119PRODUCT = create_engine(
    "mysql+pymysql://jr_sync_yu:[email protected]:4119/product",
    connect_args={"charset": "utf8"})

tasks = [
    (splitter.MysqlReader("fund_info", ENGINE_RD),
     splitter.MysqlReader("fund_info", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_asset_scale", ENGINE_RD),
     splitter.MysqlReader("fund_asset_scale", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_allocation_data", ENGINE_RD),
     splitter.MysqlReader("fund_allocation_data", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_fee_data", ENGINE_RD),
     splitter.MysqlReader("fund_fee_data", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_manager_mapping", ENGINE_RD),
     splitter.MysqlReader("fund_manager_mapping", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_org_mapping", ENGINE_RD),
     splitter.MysqlReader("fund_org_mapping", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_portfolio", ENGINE_RD),
     splitter.MysqlReader("fund_portfolio", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_security_data", ENGINE_RD),
     splitter.MysqlReader("fund_security_data", ENGINE_4119PRODUCT)),
Ejemplo n.º 11
0
try:
    sys.path.append(os.getcwd()[:os.getcwd().index("SCRIPT")])
except:
    pass

import datetime as dt
from dateutil.relativedelta import relativedelta
from utils.database import config as cfg
from utils.synckit.cli import tools
from utils.synckit.mysqlreader import splitter

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_4119PRODUCT = cfg.load_engine()["4Gp"]

tasks = [
    (splitter.MysqlReader("org_scale_type", ENGINE_RD),
     splitter.MysqlReader("org_scale_type", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_nv_standard_w", ENGINE_RD),
     splitter.MysqlReader("fund_nv_standard_w", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("fund_nv_standard_m", ENGINE_RD),
     splitter.MysqlReader("fund_nv_standard_m", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("org_timeseries", ENGINE_RD),
     splitter.MysqlReader("org_timeseries", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("org_asset_scale", ENGINE_RD),
     splitter.MysqlReader("org_asset_scale", ENGINE_4119PRODUCT)),
]


def sync(t0, t1):
    WHERE = "WHERE update_time BETWEEN '{t0}' AND '{t1}'".format(
        t0=t0.strftime("%Y%m%d%H%M%S"), t1=t1.strftime("%Y%m%d%H%M%S"))
Ejemplo n.º 12
0
try:
    sys.path.append(os.getcwd()[:os.getcwd().index("SCRIPT")])
except:
    pass

import datetime as dt
from dateutil.relativedelta import relativedelta
from utils.database import config as cfg
from utils.synckit.mysqlreader import splitter
from utils.synckit.cli import tools

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_8612GT = cfg.load_engine()["8612test_sync"]

tasks = [
    (splitter.MysqlReader("fund_info", ENGINE_RD), splitter.MysqlReader("fund_info", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_info_aggregation", ENGINE_RD), splitter.MysqlReader("fund_info_aggregation", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_asset_scale", ENGINE_RD), splitter.MysqlReader("fund_asset_scale", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_allocation_data", ENGINE_RD), splitter.MysqlReader("fund_allocation_data", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_fee_data", ENGINE_RD), splitter.MysqlReader("fund_fee_data", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_manager_mapping", ENGINE_RD), splitter.MysqlReader("fund_manager_mapping", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_month_index_static", ENGINE_RD), splitter.MysqlReader("fund_month_index", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_org_mapping", ENGINE_RD), splitter.MysqlReader("fund_org_mapping", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_portfolio", ENGINE_RD), splitter.MysqlReader("fund_portfolio", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_security_data", ENGINE_RD), splitter.MysqlReader("fund_security_data", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_type_mapping", ENGINE_RD), splitter.MysqlReader("fund_type_mapping", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_weekly_index_static", ENGINE_RD), splitter.MysqlReader("fund_weekly_index", ENGINE_8612GT)),
    (splitter.MysqlReader("index_monthly_return", ENGINE_RD), splitter.MysqlReader("index_monthly_return", ENGINE_8612GT)),
    (splitter.MysqlReader("index_monthly_risk", ENGINE_RD), splitter.MysqlReader("index_monthly_risk", ENGINE_8612GT)),
    (splitter.MysqlReader("index_monthly_subsidiary", ENGINE_RD), splitter.MysqlReader("index_monthly_subsidiary", ENGINE_8612GT)),
    (splitter.MysqlReader("index_daily_return", ENGINE_RD), splitter.MysqlReader("index_daily_return", ENGINE_8612GT)),
Ejemplo n.º 13
0
try:
    sys.path.append(os.getcwd()[:os.getcwd().index("SCRIPT")])
except:
    pass

import datetime as dt
from dateutil.relativedelta import relativedelta
from utils.database import config as cfg
from utils.synckit.mysqlreader import splitter
from utils.synckit.cli import tools

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_8612GT = cfg.load_engine()["8612test_sync"]

tasks = [
    (splitter.MysqlReader("fund_weekly_index_static", ENGINE_RD),
     splitter.MysqlReader("fund_weekly_index", ENGINE_8612GT)),
    (splitter.MysqlReader("index_monthly_return", ENGINE_RD),
     splitter.MysqlReader("index_monthly_return", ENGINE_8612GT)),
    (splitter.MysqlReader("index_monthly_risk", ENGINE_RD),
     splitter.MysqlReader("index_monthly_risk", ENGINE_8612GT)),
    (splitter.MysqlReader("index_monthly_subsidiary", ENGINE_RD),
     splitter.MysqlReader("index_monthly_subsidiary", ENGINE_8612GT)),
    (splitter.MysqlReader("index_daily_return", ENGINE_RD),
     splitter.MysqlReader("index_daily_return", ENGINE_8612GT)),
    (splitter.MysqlReader("index_daily_risk", ENGINE_RD),
     splitter.MysqlReader("index_daily_risk", ENGINE_8612GT)),
    (splitter.MysqlReader("index_daily_subsidiary", ENGINE_RD),
     splitter.MysqlReader("index_daily_subsidiary", ENGINE_8612GT)),
    (splitter.MysqlReader("index_weekly_return", ENGINE_RD),
     splitter.MysqlReader("index_weekly_return", ENGINE_8612GT)),
Ejemplo n.º 14
0
try:
    sys.path.append(os.getcwd()[:os.getcwd().index("SCRIPT")])
except:
    pass

import datetime as dt
from dateutil.relativedelta import relativedelta
from utils.database import config as cfg
from utils.synckit.mysqlreader import splitter
from utils.synckit.cli import tools

ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_8612GT = cfg.load_engine()["8612test_sync"]

tasks = [
    (splitter.MysqlReader("fund_subsidiary_weekly_index", ENGINE_RD),
     splitter.MysqlReader("fund_subsidiary_weekly_index", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_subsidiary_weekly_index2", ENGINE_RD),
     splitter.MysqlReader("fund_subsidiary_weekly_index2", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_subsidiary_weekly_index3", ENGINE_RD),
     splitter.MysqlReader("fund_subsidiary_weekly_index3", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_month_return", ENGINE_RD),
     splitter.MysqlReader("fund_month_return", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_month_risk", ENGINE_RD),
     splitter.MysqlReader("fund_month_risk", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_month_risk2", ENGINE_RD),
     splitter.MysqlReader("fund_month_risk2", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_subsidiary_month_index", ENGINE_RD),
     splitter.MysqlReader("fund_subsidiary_month_index", ENGINE_8612GT)),
    (splitter.MysqlReader("fund_subsidiary_month_index2", ENGINE_RD),
     splitter.MysqlReader("fund_subsidiary_month_index2", ENGINE_8612GT)),
Ejemplo n.º 15
0
ENGINE_RD = cfg.load_engine()["2Gb"]
ENGINE_4119PRODUCT = cfg.load_engine()["4Gp"]

tasks = [
    # (splitter.MysqlReader("fund_info", ENGINE_RD), splitter.MysqlReader("fund_info", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_asset_scale", ENGINE_RD), splitter.MysqlReader("fund_asset_scale", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_allocation_data", ENGINE_RD), splitter.MysqlReader("fund_allocation_data", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_fee_data", ENGINE_RD), splitter.MysqlReader("fund_fee_data", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_manager_mapping", ENGINE_RD), splitter.MysqlReader("fund_manager_mapping", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_org_mapping", ENGINE_RD), splitter.MysqlReader("fund_org_mapping", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_portfolio", ENGINE_RD), splitter.MysqlReader("fund_portfolio", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_security_data", ENGINE_RD), splitter.MysqlReader("fund_security_data", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_type_mapping", ENGINE_RD), splitter.MysqlReader("fund_type_mapping", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_weekly_index_static", ENGINE_RD), splitter.MysqlReader("fund_weekly_index", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_month_index_static", ENGINE_RD), splitter.MysqlReader("fund_month_index", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("index_monthly_return", ENGINE_RD), splitter.MysqlReader("index_monthly_return", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("index_monthly_risk", ENGINE_RD), splitter.MysqlReader("index_monthly_risk", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("index_monthly_subsidiary", ENGINE_RD), splitter.MysqlReader("index_monthly_subsidiary", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("index_weekly_return", ENGINE_RD), splitter.MysqlReader("index_weekly_return", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("index_weekly_risk", ENGINE_RD), splitter.MysqlReader("index_weekly_risk", ENGINE_4119PRODUCT)),
    (splitter.MysqlReader("index_weekly_subsidiary", ENGINE_RD), splitter.MysqlReader("index_weekly_subsidiary", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("manager_info", ENGINE_RD), splitter.MysqlReader("manager_info", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("manager_resume", ENGINE_RD), splitter.MysqlReader("manager_resume", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("market_index", ENGINE_RD), splitter.MysqlReader("market_index", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("org_executive_info", ENGINE_RD), splitter.MysqlReader("org_executive_info", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("org_info", ENGINE_RD), splitter.MysqlReader("org_info", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("org_integrity", ENGINE_RD), splitter.MysqlReader("org_integrity", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_nv_standard_w", ENGINE_RD), splitter.MysqlReader("fund_nv_standard_w", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_nv_standard_m", ENGINE_RD), splitter.MysqlReader("fund_nv_standard_m", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_nv_data_standard", ENGINE_RD), splitter.MysqlReader("fund_nv_data_standard", ENGINE_4119PRODUCT)),
    # (splitter.MysqlReader("fund_nv_data_source", ENGINE_RD), splitter.MysqlReader("fund_nv_data_source", ENGINE_4119PRODUCT)),