Created
December 8, 2017 09:57
-
-
Save malinxiao/d7d6c9220ec8e6605889b0e531546f1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
#"Filtered Dates" = List.Dates(StartDate, Duration.Days(EndDate - StartDate)+1, #duration(1, 0, 0, 0)), | |
#"Dates Table"= Table.FromList(#"Filtered Dates", Splitter.SplitByNothing(), {"Date"}, null, ExtraValues.Error), | |
#"Extract Date Path" = Table.AddColumn(#"Dates Table", "DatePathPart",each Text.From(Date.Year([Date])) & "/" | |
& Text.PadStart(Text.From(Date.Month([Date])),2,"0") & "/" | |
& Text.PadStart(Text.From(Date.Day([Date])),2,"0")), | |
#"Add Root Path" = Table.AddColumn(#"Extract Date Path", "RootPath", | |
each Text.From("adl://ninjagodem0123.azuredatalakestore.net/Samples/Demo/")), | |
#"Add Folde Path" = Table.AddColumn(#"Add Root Path", "FolderPath", each [RootPath] & [DatePathPart]), | |
#"Invoked Custom Function" = Table.AddColumn(#"Add Folde Path", "Files", each LoadFilesByFolder(Text.From([FolderPath]))), | |
#"Expanded Files" = Table.ExpandTableColumn(#"Invoked Custom Function", "Files", | |
{"Content", "Name", "Extension", "Date accessed", "Date modified", "Date created", "Attributes", "Folder Path"}, | |
{"Files.Content", "Files.Name", "Files.Extension", "Files.Date accessed", | |
"Files.Date modified", "Files.Date created", "Files.Attributes", "Files.Folder Path"}) | |
in | |
#"Expanded Files" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment