https://prefect.io logo
Title
b

Brett Naul

12/11/2019, 12:50 AM
having a weird issue that I haven’t seen anything similar to before: I’m trying to run a
BigQueryLoadGoogleCloudStorage
task (which I wrote but that isn’t really helping 😬) and passing in
schema
as a list; by the time
schema
is used in
run
, somehow the order of the list is being altered, causing the columns to be mis-identified. any idea what might be messing with the
schema
input to my task? some kind of argument validation or copy maybe…? context: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/tasks/google/bigquery.py#L346-L409
j

Jeremiah

12/11/2019, 12:52 AM
Try wrapping the schema in a
Constant(schema)
to force the order to be preserved
We need to improve introspection of lists-of-constants I think
b

Brett Naul

12/11/2019, 12:57 AM
yep that fixed it! I can see now why it works the way it does but it can definitely be counterintuitive (and you might not notice right away)
j

Jeremiah

12/11/2019, 1:47 AM
I’ve attempted to improve the situation here https://github.com/PrefectHQ/prefect/pull/1829