Forum Discussion
Datasource CSV File Folder > Delete old Data creates expression.error
Probably the name of an old file is hard coded in one of your queries. Prime suspect would be a query "Sample Binary", which is one of the objects created when the "Combine Binaries" functionality is used to combine files from a folder.
You can adjust that code so it points to the first (selected) file in the folder.
For instance:
SampleBinary = Source{0}[Content]
where "Source" is the name of the previous step.
This behaviour was adjusted (for new combine binaries) in the May 2017 upgrade, as follow up on an idea raised by yours truly.
Hi MarcelBeug,
sorry for the late reply.
My "SampleFile" looks like this in advanced editor (german, Quelle = source):
let
Quelle = Folder.Files("C:\perfdata"),
#"C:\perfdata\_perfdata_2017-04-05 csv1" = Quelle{[#"Folder Path"="C:\perfdata\",Name="perfdata_2017-04-05.csv"]}[Content]
in
#"C:\perfdata\_perfdata_2017-04-05 csv1"But I dont have any other previous step, so how should I do this here?
Thanks for any hint!
- MarcelBeug9 years agoCommunity Champion
So "Quelle" is your previous step and the solution would:
let Quelle = Folder.Files("C:\perfdata"), SampleBinary = Quelle{0}[Content] in SampleBinary - CahabaData9 years agoMemorable Member
This interests me. Let me see if I understand your issue generically: your source file(s) name(s) is/are regularly changing (we assume the structure is always identical)...
and so are you invoking the Refresh or are you changing data source and doing a new Get Data?