Forum Discussion
Source page keeps getting small changes
- Anonymous1 year ago
Hi Missippy,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Can please try below M code to adopt to any changes
let
Source = Web.Page(Web.Contents("https://www.baseball-reference.com/teams/tgl.cgi?team=NYY&t=p&year=2025")),
AllTables = Source[Data],// Convert all columns in all tables to text
ProcessedTables = List.Transform(
AllTables,
each Table.TransformColumnTypes( _,List.Transform(Table.ColumnNames(_), each {_, type text}))),// Optional: Combine into one big table (if structures are the same)
CombinedTable = Table.Combine(ProcessedTables)
in
CombinedTable
Kind regards,
Prasanna Kumar
Hi Missippy,
Thanks for reaching out to the Microsoft Fabric Forum Community.
If you want to ignore newly added columns and only keep specific ones, you can use the following M code.
Table.SelectColumns(Source, {"Col1", "Col2"}, MissingField.Ignore)
This helps avoid errors when the source adds new columns unexpectedly.
However, if you want to load the entire table dynamically, including all columns, you can get the list of all columns using.
AllColumns = Table.ColumnNames(Source)
If the issue still persists, please share the M code you’re using so we can take a closer look and help you resolve it.
Thanks & regards,
Prasanna Kumar
I have been out of town all weekend so I didn't get to work on this. I did learn how to get to the M code area. I can take a picture of it but it is a huge field. My question for you Prasanna, where do I add that line? At the very top?