Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
Automatic refresh failed in power bi service online. It throwing an error [Expression.Error] 3 arguments were passed to a function which expects 1. Table BlogPostTotal.
The below Power query I have created in custom connector. It works in power bi desktop but not works in automatic refresh in power bi online. Please advise.
[DataSource.Kind="HubSpot", Publish="HubSpot.UI"]
shared HubSpot.Contents = Value.ReplaceType(HubSpotCore.Contents, type function (#"Hubspot Connector" as Uri.Type) as any);
shared HubSpotCore.Contents = () =>
let
source = #table({"Name", "Data", "ItemKind", "ItemName", "IsLeaf"}, {
{ "Blog Posts Total", BlogPostTotal(), "Table", "Table", true }
}),
navTable = Table.ToNavigationTable(source, {"Name"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
in
navTable;
BlogPostTotal = () as table =>
let
finalUrl = "https://api.hubspot.com/activities/v2/reports/blog-posts/total?portalId=4490686&clienttimeout=10000&...",
portalId=4490686&clienttimeout=10000&start=20190126&end=20190224&sort=rawViews&sortDir=DESC&limit=100&offset=0&useForeignIndex=true",
content = Web.Contents(finalUrl),
#"Imported JSON" = Json.Document(content),
#"Converted to Table" = Record.ToTable(#"Imported JSON")
in
#"Converted to Table";
Thanks
Vinoth
Hi @Anonymous ,
I think that should be the issue of your data source. As there is no connector for HubSpot in Power BI desktop. you can consider to create ODBC data source by after installing the HubSpot ODBC Driver, then connect to the ODBC data source in Power BI Desktop. Then configure the on-prem gateway to set the scheduled refresh of the dataset. Also there is an idea about that, you can vote it up.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/7836831-hubspot-as-a-data-source
Regards,
Frank
Hi,
I connected the datasource as Rest API connector. I visited the url that you sent me.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/7836831-hubspot-as-a-data-source
@Jeff mentioned Rest API is working fine.
But in my case I unable to find the root cause. As per the microsoft blog, I followed the custom connector Oauth2 template.
https://docs.microsoft.com/en-us/power-query/creatingfirstconnector
Please advise.
Thanks
Vinoth