When I use IMPORTDATA command on google sheets and provide a publicly shared Metabase question csv link as a parameter, the result is #N/A. I have passed the login, password for authentication in the URL as well.
Please help.
When I use IMPORTDATA command on google sheets and provide a publicly shared Metabase question csv link as a parameter, the result is #N/A. I have passed the login, password for authentication in the URL as well.
Please help.
No worries, I found the answer. We have a basic authentication set up for Metabase, so I just had to write a Google Apps script to go around it.
Hi Sudeep, can you share more details of how you solved it please? I think I might be facing the same issue. Iām getting āCould not fetch urlā when using importdata on metabase public csv link
@sudeep Iād love to set this up if youāre able to share the auth script you used. Thx!
A google for google+apps+script+basic+authorization spits out:
And then on top if google apps script is new to you (as it is to me) ⦠the links in https://stackoverflow.com/tags/google-apps-script/info
Does that work for you?
Thanks for your solutions but I already figured it out myself.
All I did was pass the basic auth credentials in the get call:
var resp = UrlFetchApp.fetch(csvUrl, {
headers: {
// use basic auth
āAuthorizationā: 'Basic ā + Utilities.base64Encode(
user + ā:ā + pw, Utilities.Charset.UTF_8)
}
});