Data Analytics
  • All of Microsoft
  • Python
  • My Role
    • All in My Role
    • Data Analytics
  • Focus
    • All in Focus
    • Microsoft Ignite 2026
    • Microsoft Fabric
    • What's Hot
    • M365 Release
  • Security & Identity
Timespan
explore our new search
Microsoft Fabric: Load a CSV into a Lakehouse and query it
Microsoft Fabric

Microsoft Fabric: Load a CSV into a Lakehouse and query it

by HubSite 365 about Pragmatic Works

Turn a CSV in a Fabric Lakehouse into a Delta table, then query it through the SQL analytics endpoint.

Key insights

  • Uploading a CSV to the Lakehouse Files area does not make it a table for the SQL analytics endpoint.
  • Use the file's menu and Load to tables to create a Delta table from the CSV.
  • The Lakehouse SQL analytics endpoint is read-only; it can query Delta tables, not update them with SQL.
  • Dataflow Gen2 is an alternative when you need to clean or transform the CSV before loading it.
  • Treat a directly loaded table as raw data; consider cleaning and modeling it before creating a semantic model.

Microsoft Fabric lets you upload a CSV to a Lakehouse, convert it into a Delta table, and query that table through the Lakehouse SQL analytics endpoint. This workflow is useful for Fabric users who want to inspect file data with SQL or prepare it for further modeling. Pragmatic Works demonstrates the process using a retail orders CSV and explains why uploading a file alone is not enough.

What it does

A Lakehouse separates files from tables. A CSV placed in the Lakehouse Files area remains a file; it does not automatically appear as a table in the SQL analytics endpoint. To query the data there, load the CSV into a table, which the demonstration identifies as a Delta Parquet table.

Creating a Lakehouse also creates a SQL analytics endpoint. The endpoint provides a SQL interface to read data from the Lakehouse, but it is not the same as a Fabric Warehouse. In particular, the endpoint is read-only: you cannot use SQL there to update Lakehouse data. The demonstrated workflow keeps the uploaded file and creates a table that can be queried separately.

Who it is for and what you need

This process suits Fabric users who have a CSV and want to get it into a Lakehouse table without first building a more involved ingestion flow. It also helps SQL users understand the distinction between storing a file and creating a table that the endpoint can read.

Start with access to a Fabric workspace and a CSV file to upload. When creating the Lakehouse, the demonstration turns on Lakehouse schemas. It recommends doing so, but the core load-and-query sequence is uploading the CSV, loading it to a table, and querying that table. The demonstration does not identify a particular license or rollout stage.

How it works

  1. Create a Lakehouse. In a Fabric workspace, create a new Lakehouse. The demonstrated setup enables Lakehouse schemas during creation.
  2. Upload the CSV. Open the Lakehouse, go to Files, and upload the file. The CSV appears in the Files area. At this point it is still a file, not a table exposed in the SQL endpoint.
  3. Load the file into a table. Open the CSV file's ellipsis menu and choose the option to load data to a new table. Confirm the table name and indicate that the first row contains column names if that matches the file. Check the separator setting, then select Load.
  4. Open the SQL analytics endpoint. Return to the workspace and open the endpoint associated with the Lakehouse. The new table should now appear in the endpoint's table explorer.
  5. Run a query. Use the table's menu to start a new SQL query or select the option to query the top 100 rows. The demonstration uses that option to view the loaded data.

These steps create a table from the CSV; they do not perform data cleansing. Check the table and its columns after loading, especially that the header row and separator were handled as intended. If the result is not structured as expected, revisit those choices or prepare the data before loading it.

Limitations and alternatives

The main limitation is the difference between a file and a table. Uploading a CSV alone leaves it in Files, where it can be viewed, but it does not put it among the tables available through the SQL analytics endpoint. Load it into a table before relying on that endpoint for SQL queries.

The endpoint is for reading Lakehouse data, not for changing it with SQL. The demonstration notes that updates can be made through a notebook, including with Spark SQL, but not through the Lakehouse endpoint in the same way as a SQL warehouse. Choose the tool based on whether you need to query the table or modify data.

For data that needs cleaning, Dataflow Gen2 is an alternative to loading the CSV directly. It can use Power Query Editor-style transformations before data is loaded. The quick direct load skips that preparation, so it is best understood as an initial ingestion step rather than a complete modeling process.

The presenter also cautions against using raw data as the finished semantic model. The suggested approach is to keep source data in a Bronze layer, clean and combine it in a Silver layer, and shape a Gold layer around a star schema before building the semantic model. Creating a simple model from the newly loaded table is possible, but may not be the right stage for a production model.

Sources

Frequently asked questions

Can I query a CSV directly from a Fabric Lakehouse SQL analytics endpoint?

Not through the workflow described here. Uploading the CSV leaves it in Files; load it into a Delta table for the endpoint to query.

How do I load a CSV into a Fabric Lakehouse table?

Upload it in the Lakehouse Files area, open the file's ellipsis menu, and choose the option to load it to a new table. Confirm the table name and header and separator settings before loading.

Can I update Lakehouse data using its SQL analytics endpoint?

No. The endpoint is read-only. The demonstration identifies notebooks, including Spark SQL, as a way to update Lakehouse data.

Should I create a semantic model directly from the raw CSV table?

You can create a semantic model from the table, but the recommended approach is to clean and combine raw data and build a star schema before using it in a finished semantic model.