Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Скрипт на котором падает power bi. Парсинг CSV. Есть подозрение на ошибки в данных, но пока понять не могу как локализовать.

// tags let Source = Csv.Document(File.Contents("\Mac\Home\Documents\Google drive insync\Google Drive\Мои Исследования\Golos power bi\all comments golos2.txt"),[Delimiter="#(tab)", Columns=45, Encoding=65001, QuoteStyle=QuoteStyle.Csv]), #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]), #"Removed Other Columns" = Table.SelectColumns(#"Promoted Headers",{"ID", "json_metadata"}), #"Removed Errors" = Table.RemoveRowsWithErrors(#"Removed Other Columns"), #"Parsed JSON" = Table.TransformColumns(#"Removed Errors",{{"json_metadata", Json.Document}}), #"Expanded json_metadata" = Table.ExpandRecordColumn(#"Parsed JSON", "json_metadata", {"tags"}, {"tags"}), #"Expanded tags1" = Table.ExpandListColumn(#"Expanded json_metadata", "tags"), #"Changed Type" = Table.TransformColumnTypes(#"Expanded tags1",{{"ID", Int64.Type}}), #"Kept Errors" = Table.SelectRowsWithErrors(#"Changed Type") in #"Kept Errors"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment