Esempio n. 1
0
def test():
    from utils.etlkit.ext import tools
    import os
    import datetime as dt
    t = tools.TableComparer("data_test.fund_description_test", "base_public.fund_description", ENGINE_RD,
                            cols_excluded={'fund_id',	'data_source', 'entry_time', 'update_time', 'fund_name'})
    t.result.to_csv(os.path.expanduser("~/Desktop/fund_description_{tm}.csv".format(tm=dt.date.today().strftime("%Y%m%d"))))
    print(t.result)
    return t
Esempio n. 2
0
def test():
    from utils.etlkit.ext import tools
    import os
    import datetime as dt
    t = tools.TableComparer("data_test.fund_holder_test", "base_public.fund_holder", ENGINE_RD,
                            cols_excluded={"fund_id", "data_source", "entry_time", "source_id", "update_time"})
    t.result.to_csv(os.path.expanduser("~/Desktop/fund_holder_{tm}.csv".format(tm=dt.date.today().strftime("%Y%m%d"))))
    print(t.result)
    return t
Esempio n. 3
0
def test():
    from utils.etlkit.ext import tools
    import os
    import datetime as dt
    t = tools.TableComparer("data_test.org_shareholder_test", "base_public.org_shareholder", ENGINE_RD,
                            cols_excluded={'org_id', 'statistic_date', 'org_name', 'entry_time', 'update_time',
                                           'data_source'})
    t.result.to_csv(os.path.expanduser("~/Desktop/org_shareholder__{tm}.csv".format(tm=dt.date.today().strftime("%Y%m%d"))))
    print(t.result)
    return t
Esempio n. 4
0
def test():
    from utils.etlkit.ext import tools
    ENGINER = cfg.load_engine()["2Gbp"]

    tc = tools.TableComparer(
        "base_test.fund_position_bond_test",
        "base_public.fund_position_bond",
        ENGINER,
        cols_included={"quantity", "scale", "asset_scale", "proportion_net"})
    res = tc.result
    res.to_csv("fund_position_bond.csv", )
Esempio n. 5
0
def test():
    import os
    from utils.etlkit.ext import tools
    from utils.database import config as cfg
    ENGINER = cfg.load_engine()["2Gbp"]

    tc = tools.TableComparer(
        "base_test.fund_position_bond_test_20180515",
        "base_public.fund_position_bond",
        ENGINER,
        cols_included={"quantity", "scale", "asset_scale", "proportion_net"},
    )
    res = tc.result
    res.to_csv(os.path.expanduser("~/Desktop/fund_position_bond.csv"),
               encoding="gbk")
Esempio n. 6
0
def test():
    from utils.etlkit.ext import tools
    import os
    import datetime as dt
    t = tools.TableComparer("data_test.person_info_test",
                            "base.person_info",
                            ENGINE_RD,
                            cols_excluded={
                                'person_id', 'person_name', 'entry_time',
                                'update_time', 'person_name_py'
                            })
    t.result.to_csv(
        os.path.expanduser("~/Desktop/person_info_{tm}.csv".format(
            tm=dt.date.today().strftime("%Y%m%d"))))
    print(t.result)
    return t
Esempio n. 7
0
def test():
    from utils.etlkit.ext import tools
    import os
    import datetime as dt
    t = tools.TableComparer("data_test.org_info_test",
                            "base_public.org_info",
                            ENGINE_RD,
                            cols_excluded={
                                "org_id", "org_name", "entry_time",
                                "org_type_code", "update_time", "org_type",
                                "data_source", "profile", "scale_mgt"
                            })
    t.result.to_csv(
        os.path.expanduser("~/Desktop/org_info_{tm}.csv".format(
            tm=dt.date.today().strftime("%Y%m%d"))))
    print(t.result)
    return t