Is it possible to set `tag` `"dagster/priority"` o...
# ask-community
p
Is it possible to set
tag
"dagster/priority"
of an aliased
op()
? I tried setting it via job run config but it failed. Is the only option to set it in `op()`'s decorator (it does not work in case of
.alias()
? EDIT: when I try to set it in the run config like this:
Copy code
clients_to_crm.execute_in_process(
            {
                "ops": {
                    "save_clients": {  # this is the aliased op
                        "tags": {"dagster/priority": "98"},
                        "config": {
                            "table_name": "my_custom_config_that_i_also_use",
                        },
                    }
                },
            },
        )
I get such error or similar:
Error 1: Received unexpected config entry "tags" at path rootopssave_clients. Expected: "{ config: { table_name: (String | { env: String }) } }".
g
hey @Piotr Danielczyk, did you use the the name you aliased with when passing the config from the job to the aliased op?
p
Hi @Gustavo Carvalho, thanks for reaching out. The problem is I cannot even state
tags
when passing data to the config. The code looks like this:
Copy code
clients_to_crm.execute_in_process(
            {
                "ops": {
                    "save_clients": {  # this is the aliased op
                        "tags": {"dagster/priority": "98"},
                        "config": {
                            "table_name": "my_custom_config_that_i_also_use",
                        },
                    }
                },
            },
        )
While the graph looks like this:
Copy code
@graph()
def clients_to_crm():
    save_to_crm.alias("save_clients")()
And I get such error :
Copy code
Error 1: Received unexpected config entry "tags" at path root:ops:save_clients. Expected: "{ config: {  table_name: (String | { env: String }) } }".
g
uh, yeah, that's true, I confused the tags and configs
I don't know if it is possible to set the op tags dinamically
o
Hi @Piotr Danielczyk ! Unfortunately, it's not possible to set op tags post-hoc. One possibility would be to use an op factory approach to programmatically generate different op definitions with different tags