Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello dear community,
I have the following problem and also query.
How can I validate the data before extracting the data, check the file(source) contains information. To avoid errors(attached image).
For example: validate if report.html has data. If NO data, create a table with two columns, one row with zero values.
(I know that the error is due to not finding the "Computer" column and it will never exist when there is no data in the html file).
let
Origen = Web.Contents("https://site.com/report.html"),
#"Tabla extraída a partir de HTML" = Html.Table(Origen, {{"Column1", "TABLE:nth-child(91) > * > TR > :nth-child(1)"}, {"Column2", "TABLE:nth-child(91) > * > TR > :nth-child(2)"}, {"Column3", "TABLE:nth-child(91) > * > TR > :nth-child(3)"}, {"Column4", "TABLE:nth-child(91) > * > TR > :nth-child(4)"}}, [RowSelector="TABLE:nth-child(91) > * > TR"]),
#"Encabezados promovidos" = Table.PromoteHeaders(#"Tabla extraída a partir de HTML", [PromoteAllScalars=true]),
#"Tipo cambiado" = Table.TransformColumnTypes(#"Encabezados promovidos",{{"Computer", type text}, {"Number", Int64.Type}, {"%", Int64.Type}, {"", type text}}),
#"Columnas quitadas" = Table.RemoveColumns(#"Tipo cambiado",{""}),
#"Tipo cambiado1" = Table.TransformColumnTypes(#"Columnas quitadas",{{"Number", Int64.Type}})
in
#"Tipo cambiado1"
Appreciated Any guidance
Solved! Go to Solution.
MissingField.Ignore might be able to help with that. It will bypass the error instead of stopping on it. Here is a video showcasing the feature.
https://www.youtube.com/watch?v=D59nkSr_JqQ&ab_channel=Goodly
MissingField.Ignore might be able to help with that. It will bypass the error instead of stopping on it. Here is a video showcasing the feature.
https://www.youtube.com/watch?v=D59nkSr_JqQ&ab_channel=Goodly
Hi jdbuchanan71
Thanks for the link. It will help me to orient myself.
Best regards
User | Count |
---|---|
98 | |
91 | |
84 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |