Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi All,
I have a little trouble with an API call in Insightly. I would like to see organization addresses as well in my reports
I have the following API description: https://api.insight.ly/v2.2/Help#!/Organisations/GetOrganisations
If I do the first expansion I can see a list of my values. That's great but do not know how to map them back.
I tried the following but I'm getting an error.
let
Source = Json.Document(Web.Contents("https://api.insight.ly/v2.2/Organisations", [Headers=[Authorization="Basic <MYKEY>", ContentType="application/json"]])),
Organisations = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
expand_1 = Table.ExpandRecordColumn(Organisations, "Column1", {
"ORGANISATION_ID",
"ORGANISATION_NAME",
"BACKGROUND",
"IMAGE_URL",
"OWNER_USER_ID",
"DATE_CREATED_UTC",
"DATE_UPDATED_UTC",
"VISIBLE_TO",
"VISIBLE_TEAM_ID",
"VISIBLE_USER_IDS",
"ADDRESSES",
"CONTACTINFOS",
"DATES",
"TAGS",
"LINKS",
"ORGANISATIONLINKS",
"CAN_EDIT",
"CAN_DELETE",
"SOCIAL_LINKEDIN",
"SOCIAL_FACEBOOK",
"SOCIAL_TWITTER"
}),
Addresses= Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
expand_2 = Table.ExpandRecordColumn(expand_1, "ADDRESSES", {"ADDRESS_ID"}, {"ADDRESS_ID"})
in
expand_2
Error code: Expression.Error: We cannot convert a value of type List to type Record.
Details:
Value=List
Type=Type
Do you have any idea how to map it? It is also good for me to have 2 queries than connect them somehow into relations.
Thanks in advance!
BR, István
Solved! Go to Solution.
Based on the error message, you may try Table.ExpandListColumn first.
Based on the error message, you may try Table.ExpandListColumn first.
Thanks. I will give it a try.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |