Hi,
Thanks for the quick responses.
Here’s a bit more context. I’m pulling OpenAlex data directly into Power BI via Power Query. The main query ("publications") recursively calls the API using cursors, and then I have several dependent tables ("authors", "topics", "funders", etc.) that expand nested fields from the publications table. Here’s the type of API call I use inside Power BI:
https://api.openalex.org/works?filter=authorships.institutions.ror:https://ror.org/008xxew50|https://ror.org/00q6h8f30|https://ror.org/0286p1c86,publication_year:2020-2024&per-page=100&cursor=*
And this is the specific PowerQuery set up I built to retrieve records from OpenAlex:
GetWorks = (rors as list, year as text, cursor as text) =>
let
BaseUrl = "https://api.openalex.org/works",
params = [Query=[filter="authorships.institutions.ror:" & Text.Combine(rors, "|") & ",publication_year:" & year,
cursor=cursor,
#"per-page"="100",
mailto="email address"]],
Page = Json.Document(Web.Contents(BaseUrl, params)),
Page_res = List.Transform(Page[results], each Record.SelectFields(_, {"id", "display_name", "doi", "open_access", "cited_by_count", "authorships", "topics","fwci", "sustainable_development_goals", "countries_distinct_count","institutions_distinct_count","abstract_inverted_index","type","is_paratext","grants"})),
Results = if not(Page[meta][next_cursor]=null) then List.Combine({Page_res, @GetWorks(rors, year, Page[meta][next_cursor])}) else Page_res
in
Results,
GetOA = (rors as list, year as text) =>
let
Table = Table.FromRecords(GetWorks(rors, year, "*"))
in
TableThis setup used to work very well before the Walden release. Since last week, the behavior has changed:
- If I refresh everything together, it fails, usually at the very end, after a very long refresh (more than one hour).
- If I refresh tables one by one, I have a higher chance of success, but still get frequent failures (same error).
The error message is:
"OLE DB or ODBC error: Exception from HRESULT: 0x80040E4E"
Any hints about what could be causing the problem would be much appreciated.
Thanks,
Silvia