Is it possible to define global Solid which can be...
# announcements
k
Is it possible to define global Solid which can be used in any file by just calling it? Something like we just import file and call that solid in DAG file. More real life example If I made
read_csv
solid do I have to copy paste every where in each project where I want to use it or there is any solution to import solids an use them?
a
Hi keval, I'm not sure what you tried but it should absolutely be possible to define a solid once in a .py file, import it in other places, and re-use them across pipeines
k
Hi @alir I tried that way but getting error
a
have you tried
mylib.hello_cereal()
?
in
hello_cereal_pipeline
k
I think I was missing two things. 1. Placing all import statements in
mylib.py
2. calling it like you suggested
mylib.hello_cereal()
and after changing that it worked. Thanks
Thanks for your help @alir
a
you're welcome. glad it works!