Farid
02/16/2022, 9:32 PMResult
using Prefect? I dump the dict objects to str
JSONs using json.dumps
and then save them using S3Result
or LocalResult
and noticed both of them get some extra characters added to the beginning or end of json object:
��QXQ >> to the beginning
�. >> to the end
which makes it un-parseable.
Saving the same object using with open()
on local machine does not bear those extra charactersKevin Kho
json.dumps()
but it’s also serialized as bytes. You can see the code for that here and you can actually make and supply your own serializer tooFarid
02/16/2022, 10:28 PMKevin Kho
Kevin Kho
Farid
02/17/2022, 12:10 AMS3Result
Object when initialisingKevin Kho
Farid
02/17/2022, 2:14 AMtask 1
to use inside the query which is then passed to SnowflakeQuery task. This doesn’t work right now because I think `task 1`'s output is only usuable inside another task not when it’s used to format a query in the flow defintion, ie:
with Flow() as flow:
table_name = task_1()
SnowflakeQuery(query=f"select * from {table_name};")
Kevin Kho
Kevin Kho
run
method with your ownKevin Kho
SnowflakeQuery(query=task(lambda table_name: f"select * from {table_name};")(table_name))
Farid
02/17/2022, 2:27 AMprefect.exceptions.ClientError: [{'path': ['get_or_create_task_run_info'], 'message': 'Expected type UUID!, found ""; Could not parse UUID: ', 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': 'Expected type UUID!, found ""; Could not parse UUID: ', 'locations': [{'line': 2, 'column': 101}], 'path': None}}}]
Kevin Kho
lambda x