https://dagster.io/ logo
#ask-community
Title
# ask-community
c

Charles Leung

04/08/2022, 4:55 PM
Hey dagster team! If i wanted to override an op in gcp like, import_df_to_bq, is there a way i can, override this to always provide a destination to reduce the configuration? e.g., i want an op that turns into import_df_to_<my_table_name>_in_bq
then in configuration, remove the need to specify the destination in the BIGQUERY_LOAD_CONFIG?
j

jamie

04/08/2022, 4:57 PM
The op factory pattern might be what you're looking for https://docs.dagster.io/concepts/ops-jobs-graphs/ops#op-factory
c

Charles Leung

04/08/2022, 5:02 PM
thanks jamie! can you provide me an example of how i would use this? would i add the destination into "ins"?
Ah nevermind, ins is for dependencies. i see the **kwargs argument, so i would then reduce the destinations kwarg 🙂 . OK thanks! I'll give it a test
@Phil Armour what do you think of this pattern instead of using @configured? just food for thought we can test out later.
p

Phil Armour

04/08/2022, 6:11 PM
it’s pretty much the same as what I proposed with my “partial” mapping generator
5 Views