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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pauperdoc
New Member

Data loads in Power Query but OLE DB or ODBC error in Power BI

Hi,

 

I'm trying to scrap text from a website (https://find.plasticsurgery.org/country/united%20states/?page=1). The website I'm trying to extract data from is arranged like this: 

pauperdoc_1-1666277105920.png

As I want all pages of data, I use the page number in the URL to create a function with the variable name "PageStart":

(PageStart as text)=>
let
Source = Web.BrowserContents("https://find.plasticsurgery.org/country/united%20states/?page="&PageStart&""),
#"Extracted Table From Html" = Html.Table(Source, {{"Phys", "H3 .ignore-click"}, {"Loca", "[itemprop=""address""]"}}, [RowSelector=".resultSet"]),
#"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Phys", type text}, {"Loca", type text}})
in
#"Changed Type"

I apply a modulo to filter by sets of 12 (there are 12 items per page).

pauperdoc_2-1666277381296.png

 

Powerquery editor is able to pull the data into a table

pauperdoc_0-1666277013354.png

 

As you can see the preview result is in a table in power query editor. There predicted to be ~8,000 rows of data. Not sure exactly.

 

I click "close & apply". It will indicate that it has loaded the first ~400 rows but before giving any output it gives this error message

Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: [DataSource.Error] We were unable to retrieve the contents of the web page..'

pauperdoc_3-1666277604197.png

 

Any help is appreciated!

 

Best,

 

Brian

 

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @pauperdoc ,

According to your description, I used your code to create a query, after I enter 1 in the function, return a table like this:

vkalyjmsft_0-1666330324879.png

Haven't found any error, I attach my sample below for your reference, you can download it to see the difference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors