Forum Discussion
Error Dataflow Refresh - column wasn't found
- Anonymous2 years ago
Hi Anonymous ,
Modify your query to check for the existence of the column before expanding it.
let Source = #"Removed columns", AllTransformFiles = Source[#"Transform file"], CombinedFiles = Table.Combine(AllTransformFiles), AllColumnNames = Table.ColumnNames(CombinedFiles), ExistingColumns = List.Intersect({AllColumnNames, {"Col1", "Col2", "Col3", "Col4"}}), ExpandedTable = Table.ExpandTableColumn(Source, "Transform file", ExistingColumns) in ExpandedTableOr you could use the "Remove Other Columns" transformation to remove any columns that are not present in the current file, and then use the "Rename Columns" transformation to ensure that the column names match across all files. This would ensure that the schema is always up-to-date and matches the current set of files.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Modify your query to check for the existence of the column before expanding it.
let
Source = #"Removed columns",
AllTransformFiles = Source[#"Transform file"],
CombinedFiles = Table.Combine(AllTransformFiles),
AllColumnNames = Table.ColumnNames(CombinedFiles),
ExistingColumns = List.Intersect({AllColumnNames, {"Col1", "Col2", "Col3", "Col4"}}),
ExpandedTable = Table.ExpandTableColumn(Source, "Transform file", ExistingColumns)
in
ExpandedTable
Or you could use the "Remove Other Columns" transformation to remove any columns that are not present in the current file, and then use the "Rename Columns" transformation to ensure that the column names match across all files. This would ensure that the schema is always up-to-date and matches the current set of files.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.