Exemplo n.º 1
0
def scope_dbt_rpc_config_disable_assets():
    # start_marker_dbt_rpc_config_disable_assets
    config = {"yield_materializations": False}

    from dagster_dbt import dbt_rpc_run

    custom_solid = dbt_rpc_run.configured(config, name="custom_solid")
Exemplo n.º 2
0
def scope_dbt_rpc_config_exclude_models():
    # start_marker_dbt_rpc_config_exclude_models
    config = {"exclude": ["my_dbt_model+", "path.to.models", "tag:nightly"]}

    from dagster_dbt import dbt_rpc_run

    custom_solid = dbt_rpc_run.configured(config, name="custom_solid")
Exemplo n.º 3
0
def scope_dbt_rpc_and_wait_config_polling_interval():
    # start_marker_dbt_rpc_and_wait_config_polling_interval
    config = {"interval": 3}  # Poll the dbt RPC server every 3 seconds.

    from dagster_dbt import dbt_rpc_run

    custom_solid = dbt_rpc_run.configured(config, name="custom_solid")
Exemplo n.º 4
0
def scope_dbt_rpc_run_specific_models():
    from dagster_dbt import dbt_rpc_resource

    my_remote_rpc = dbt_rpc_resource.configured({
        "host": "80.80.80.80",
        "port": 8080
    })
    # start_marker_dbt_rpc_run_specific_models
    from dagster import ModeDefinition, pipeline
    from dagster_dbt import dbt_rpc_run

    run_staging_models = dbt_rpc_run.configured(
        {"models": ["tag:staging"]},
        name="run_staging_models",
    )

    @pipeline(
        mode_defs=[ModeDefinition(resource_defs={"dbt_rpc": my_remote_rpc})])
    def my_dbt_pipeline():
        run_staging_models()