Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I try to upload a sas7bdat file in Power BI via R code. It works fine with this code:
require(sas7bdat)
input<-read.sas7bdat("C:/Users/jansens/Desktop/filename.sas7bdat")
Now I would like tot put the filepath into a parameter, in order to be able to move a whole group of sas7bdat files to another folder and still be able to use my PowerBI datamodel, simply by changing the value of the parameter.
So I made a parameter with the name path and the value C:/Users/jansens/Desktop/, which I then use in the R script:
require(sas7bdat)
input<-read.sas7bdat(""&path&"filename.sas7bdat")
But now I get the following error: object 'path' not found.
Any idea how to make this work?
Hi @Anonymous ,
Maybe you can try like this:
"&""""& path & "filename.sas7bdat"
Refer these artilces:
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
94 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |