Forum Discussion

Missippy's avatar
Missippy
Helper I
1 year ago
Solved

Source page keeps getting small changes

I run power queries every morning where I download a lot of data from a webpage. The source keeps making these small changes, like adding a column to the page I am trying to download. When they do, m...
  • Anonymous's avatar
    Anonymous
    1 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