https://flyte.org logo
#ask-the-community
Title
# ask-the-community
v

varsha Parthasarathy

10/19/2022, 9:46 PM
Hi team, does anyone know what can be a good default value for type
FlyteFile
y

Yee

10/20/2022, 12:31 AM
what do you mean?
as something to return?
can you make it an optional? an empty file is probably the best default value but i would still wonder if there’s a better approach
v

varsha Parthasarathy

10/20/2022, 12:33 AM
@Yee - We are upgrading some old code in our database. In old flytekit version (really old) - If
None
was passed as an input, our code would generate the default files for those options. But the current version of Flytekit does not accept
None
as a parameter. So I am looking for a default value for an input of type
FlyteFile
which could indicate that no value was passed. I’ve tried
None
and empty string
''
but Flyte does not accept both of there.
@Yee - Empty file - shouldn’t this reside someplace or can i create one locally and assign to it?
y

Yee

10/20/2022, 12:35 AM
can you not use Optional?
v

varsha Parthasarathy

10/20/2022, 5:51 PM
I will try this and get back to you
Thanks!