Hi everyone, I have lots of repeating params in co...
# announcements
e
Hi everyone, I have lots of repeating params in config, can anyone help me refactor? Don't understand how to share a parameter between different aliases of solids. Code in thread
Copy code
def run_pipeline(update_from=None):
    if update_from is None:
        update_from = (
            (datetime.now() - relativedelta(hours=8)).isoformat()
            # "2019-10-01T11:41:00.160867"
        )
    return execute_pipeline(
        feature_update_pipeline,
        environment_dict={
            "solids": {
                "case_files_table_changed": {
                    "inputs": {
                        "params": {"value": {"last_update_at": update_from}},
                    }
                },
                "new_payments": {
                    "inputs": {
                        "params": {"value": {"last_update_at": update_from}},
                    }
                },
                "changed_addresses": {
                    "inputs": {
                        "params": {"value": {"last_update_at": update_from}},
                    }
                },}}
Oh this formatting... I pass this param to sql file later
k
a
Another path you may consider is using the resource system to provide this information https://dagster.readthedocs.io/en/0.6.3/sections/learn/tutorial/resources.html
👍 1