Edit

Share via


Create tables in the Warehouse in Microsoft Fabric

Applies to: ✅ Warehouse in Microsoft Fabric

To get started, you must complete the following prerequisites:

For more information on connecting to your Warehouse in Microsoft Fabric, see Connectivity.

This article provides two examples on how to create a new table in Fabric Data Warehouse, from a parquet file or through the warehouse editor in the Fabric portal.

Create a new table in the SQL query editor from a file

  1. In the query editor, paste and run the following T-SQL code:
CREATE TABLE dbo.bing_covid AS
SELECT *
FROM OPENROWSET(BULK 'https://pandemicdatalake.blob.core.windows.net/public/curated/covid-19/bing_covid-19_data/latest/bing_covid-19_data.parquet')

The CTAS (Create Table As Select) statement creates a new table and populates it with data retrieved from the specified source file, streamlining the process of both defining and loading the table in a single step. You can find more ingestion options in Ingest data with T-SQL page.

Create a new table in the SQL query editor with templates

  1. In the warehouse editor ribbon, locate the SQL templates dropdown list.
  2. Select New table, and an autogenerated CREATE TABLE script template appears in your new SQL query window.
  3. Modify the CREATE TABLE template to suit your new table.
  4. Select Run to create the table.

To learn more about supported table creation in Warehouse in Microsoft Fabric, see Tables in data warehousing in Microsoft Fabric and Data types in Microsoft Fabric.

Next step