Ben Fogelson
12/18/2019, 11:20 PMsolid
to have a default value? e.g.
@solid
def some_solid(context, x, y=1.0):
do_something(x, y)
Related question, is there a way to set the value for a solid in config so that aliases of the solid inherit that value?abhi
12/19/2019, 1:08 AMBen Fogelson
12/19/2019, 1:30 AM@solid
def do_transformation(context, data, transformation_parameter):
return transformation_parameter * data
In this case the solid just multiplies my data by a constant.
I might need to apply the exact same transformation (with the same value of transformation_parameter
to more than one value of data
. In dagster, that would be achieved with aliasing:
@pipeline
def some_pipeline():
# upstream stuff
result_a = do_transformation.alias('do_transformation_a')(data_a)
result_b = do_transformation('do_transformation_b')(data_b)
I can stub a value for the transformation_parameter
input in a yaml file, but I have to separately stub for the two aliased solids:
solids:
do_transformation_a:
inputs:
transformation_parameter:
value: 5
# etc
What I’d like is a way to set a single value for transformation_parameter
in my yaml that is applied to both do_transformation_a
and do_transformation_b
abhi
12/19/2019, 2:02 AMalex
12/19/2019, 5:40 PM