You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"there is no header and columns have not been supplied\n"
"configure the 'columns' field or set header to the 0-based"
"index in which it appears in the file, or set this value to"
"'infer'"
)
forcolumninfiltered_columns:
ifcolumnnotinall_columns:
raise (ValueError(f"Filter column {column} not in column list"))
I may be following it incorrectly, but if self.columns is not set, then all_columns is always equal to [], and a ValueError is raised for any filter. self.columns is not set when:
there is a non-csv source
the header mode is set to HeaderMode.infer and columns is not provided
It may not be possible to tell in advance what fields may exist in a read record if:
there is a JSON(L) source and a field is not given in required_properties
there is a CSV reader, the header mode is set to HeaderMode.infer, and columns is not provided
The solution here is either to:
allow filter fields that are not explicitly expected in the configuration (via columns in the CSV reader or required_attributes in the JSON(L) reader)
require fields that will be filtered on to be explicitly stated
The text was updated successfully, but these errors were encountered:
This is the code that designates how data should be filtered in the transform:
koza/src/koza/model/config/source_config.py
Lines 228 to 245 in 8a3bab9
I may be following it incorrectly, but if
self.columns
is not set, thenall_columns
is always equal to[]
, and aValueError
is raised for any filter.self.columns
is not set when:HeaderMode.infer
andcolumns
is not providedIt may not be possible to tell in advance what fields may exist in a read record if:
required_properties
HeaderMode.infer
, andcolumns
is not providedThe solution here is either to:
columns
in the CSV reader orrequired_attributes
in the JSON(L) reader)The text was updated successfully, but these errors were encountered: