Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
somethingbig
Frequent Visitor

SharePoint Folder Connection - Cannot Apply Query Changes After Expanding Table

I am trying to create a query that lists all files from a SharePoint 2010 document respository that has files within sub folders. I am able to connect to the repository. However, when I expand the Content table to get the names and other attributes of the files within the folders, I get the following error: "OLE DB or ODBC error: [Expression.Error] We cannot convert a value of type Binary to type Table".

Capture.PNG

Here are the query steps:

 

let
    Source = SharePoint.Contents("https://xxx/", [ApiVersion = 14]),
    SharedDocuments = Source{[Name="SharedDocuments"]}[Content],
    #"Expanded Content" = Table.ExpandTableColumn(SharedDocuments, "Content", {"Name", "Extension", "Attributes"}, {"Content.Name", "Content.Extension", "Content.Attributes"})
in
    #"Expanded Content"

The error occurs only when trying to apply the query changes after the last step is added.

 

Any ideas on why I'm getting the error? There are no errors when the step is created, and I've been able to create subsequent steps as well (e.g. expand the Attributes column, filter rows, etc.) and save the file, but can't apply the query.

 

Thanks!

1 ACCEPTED SOLUTION
somethingbig
Frequent Visitor

Solved my own issue - in addition to having files in folders there are some files in the root folder. These files have a content type of Binary, while all the folders have a content type of Table, thus the error.

 

To address this issue, I need to filter out the files in the root folder and then expand the table columns. Since I want to include the files located in the root folder, I'll likely need to create a second query for those and merge the two together.

View solution in original post

1 REPLY 1
somethingbig
Frequent Visitor

Solved my own issue - in addition to having files in folders there are some files in the root folder. These files have a content type of Binary, while all the folders have a content type of Table, thus the error.

 

To address this issue, I need to filter out the files in the root folder and then expand the table columns. Since I want to include the files located in the root folder, I'll likely need to create a second query for those and merge the two together.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.