Exemplo n.º 1
0
    def test4():
        filename = os.path.join(img_dir, sys._getframe().f_code.co_name)
        with Diagram("Event Processing", show=False, filename=filename):
            source = EKS("k8s source")

            with Cluster("Event Flows"):
                with Cluster("Event Workers"):
                    workers = [ECS("worker1"), ECS("worker2"), ECS("worker3")]

                queue = SQS("event queue")

                with Cluster("Processing"):
                    handlers = [Lambda("proc1"), Lambda("proc2"), Lambda("proc3")]

            store = S3("events store")
            dw = Redshift("analytics")

            source >> workers >> queue >> handlers
            handlers >> store
            handlers >> dw
Exemplo n.º 2
0
    temp_4 = S3('industry_energy')
    temp_5 = S3('industry_skilled_oriented')
    temp_6 = S3('industry_rd_oriented')
    input_china_import_export = S3("china_import_export")
    input_city_cn_en = S3("city_cn_en")
    input_china_country_name = S3("china_country_name")
    input_china_applied_mfn_tariffs_hs2 = S3("china_applied_mfn_tariffs_hs2")
    input_hs6_china_vat_rebate = S3("hs6_china_vat_rebate")
    temp_7 = SQS('china_export_tariff_tax')
    temp_8 = SQS('china_product_quality')
    temp_10 = SQS('export_foreign_city_product')
    temp_11 = SQS('export_soe_city_product')

    with Cluster("FINAL"):

        temp_final_0 = Redshift('china_vat_quality')

    temp_final_0 << temp_1
    temp_final_0 << temp_2
    temp_final_0 << temp_3
    temp_final_0 << temp_4
    temp_final_0 << temp_5
    temp_final_0 << temp_6
    input_china_import_export >> temp_7
    input_city_cn_en >> temp_7
    input_china_country_name >> temp_7
    input_china_applied_mfn_tariffs_hs2 >> temp_7
    input_hs6_china_vat_rebate >> temp_7 >> temp_final_0
    temp_7 >> temp_8 >> temp_final_0
    input_china_import_export >> temp_10
    input_city_cn_en >> temp_10 >> temp_final_0
Exemplo n.º 3
0
from diagrams.onprem.database import Mssql, Mysql, MariaDB, Oracle, Postgresql
from diagrams.azure.database import SQLDatawarehouse
from diagrams.azure.analytics import AnalysisServices
from diagrams.aws.database import Redshift

node_attr = {"fontsize": "20"}
graph_attr = {"fontsize": "28"}

with Diagram("", show=False, direction="TB", node_attr=node_attr):
    with Cluster("On-Premises", graph_attr=graph_attr):
        with Cluster("Commercial Platforms", graph_attr=graph_attr):
            closed_source = [
                Oracle("\n+ Essbase\n& Hyperion"),
                Mssql("\n+ Analysis\nServices")
            ]

        with Cluster("Open Source Platforms", graph_attr=graph_attr):
            with Cluster(""):
                mysql = Mysql("")
                mysql >> [MariaDB("MariaDB")]
            open_source = [mysql, Postgresql("PostgreSQL")]

    with Cluster("Cloud", graph_attr=graph_attr):
        with Cluster("Azure", graph_attr=graph_attr):
            azure = [
                SQLDatawarehouse("\nAzure\nSynapse\nAnalytics"),
                AnalysisServices("\n\nAnalysis\nServices")
            ]
        with Cluster("AWS", graph_attr=graph_attr):
            aws = [Redshift("\nRedshift")]
Exemplo n.º 4
0
    temp_4 = S3('china_city_reduction_mandate')
    temp_5 = S3('china_city_tcz_spz')
    temp_6 = S3('ind_cic_2_name')
    temp_7 = S3('china_sector_pollution_threshold')
    temp_8 = S3('china_city_sector_year_pollution_threshold')
    temp_9 = S3('china_credit_constraint')
    temp_10 = S3('asif_firms_prepared')
    temp_11 = S3('asif_industry_characteristics_ownership')
    temp_12 = S3('asif_city_characteristics_ownership')
    temp_13 = S3('china_spatial_relocation')
    temp_14 = S3('province_loan_and_credit')
    temp_15 = S3('bank_socb_loan')

    with Cluster("FINAL"):

        temp_final_0 = Redshift('fin_dep_pollution_baseline_industry')

    temp_final_0 << temp_1
    temp_final_0 << temp_2
    temp_final_0 << temp_3
    temp_final_0 << temp_4
    temp_final_0 << temp_5
    temp_final_0 << temp_6
    temp_final_0 << temp_7
    temp_final_0 << temp_8
    temp_final_0 << temp_9
    temp_final_0 << temp_10
    temp_final_0 << temp_11
    temp_final_0 << temp_12
    temp_final_0 << temp_13
    temp_final_0 << temp_14