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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
suidino2
Frequent Visitor

Dataflow to lakehouse, bulk change header to appropriate format

In my scenario, many current data source table has space in the header name. I understand that when loading data to Lakehouse, table header can not have space in it. Is there a way to bulk fill the header space? Or any other function that can change header to appropriate format? 

1 ACCEPTED SOLUTION
miguel
Community Admin
Community Admin

Hi,

There's a couple of things that you can do to tackle this. 

 

The UI way

  • Reference your query twice miguel_6-1685163764002.png

     

  • In both references make sure to demote the headers miguel_0-1685163327601.png

     

  • Let's say that one of the referenced queries will be called "Headers" and the other one will be "Data"
    • For the Headers query:
      • Keep only the top 1 row miguel_1-1685163430190.png

         

      • Apply the "Replace values" transform to every single column in your query miguel_2-1685163500339.png
    • For the Data query:
      • Remove the top 1 row miguel_3-1685163582881.png

         

    • Append the Headers and Data query in that exact order miguel_4-1685163689308.png

       

    • Promote the first row to be the headers of the column miguel_5-1685163726980.png

       

    • Remove the now top 1 row of the table

miguel_8-1685163835803.png

 

The M script way requires you to first use Table.ColumnNames to get the list of columns of your table, then use a function like List.Transform to establish how you'd like to transform such list of columns and then the use those two pieces to pass the arguments required for the Table.RenameColumns function and perhaps using the List.Zip function to create that list of lists (of previous and new column names).

 

Let us know if this helps!

 

View solution in original post

1 REPLY 1
miguel
Community Admin
Community Admin

Hi,

There's a couple of things that you can do to tackle this. 

 

The UI way

  • Reference your query twice miguel_6-1685163764002.png

     

  • In both references make sure to demote the headers miguel_0-1685163327601.png

     

  • Let's say that one of the referenced queries will be called "Headers" and the other one will be "Data"
    • For the Headers query:
      • Keep only the top 1 row miguel_1-1685163430190.png

         

      • Apply the "Replace values" transform to every single column in your query miguel_2-1685163500339.png
    • For the Data query:
      • Remove the top 1 row miguel_3-1685163582881.png

         

    • Append the Headers and Data query in that exact order miguel_4-1685163689308.png

       

    • Promote the first row to be the headers of the column miguel_5-1685163726980.png

       

    • Remove the now top 1 row of the table

miguel_8-1685163835803.png

 

The M script way requires you to first use Table.ColumnNames to get the list of columns of your table, then use a function like List.Transform to establish how you'd like to transform such list of columns and then the use those two pieces to pass the arguments required for the Table.RenameColumns function and perhaps using the List.Zip function to create that list of lists (of previous and new column names).

 

Let us know if this helps!

 

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.

Top Solution Authors
Top Kudoed Authors