FabricTools v0.33.0 Public Preview

Write-FabricLakehouseTableData

Loads data into a specified table in a Lakehouse within a Fabric workspace.

Syntax

Write-FabricLakehouseTableData [-WorkspaceId] <guid> [-LakehouseId] <guid> [-TableName] <string>
 [-PathType] <string> [-RelativePath] <string> [-FileFormat] <string> [[-CsvDelimiter] <string>]
 [[-CsvHeader] <bool>] [-Mode] <string> [[-Recursive] <bool>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

Description

Loads data into a specified table in a Lakehouse within a Fabric workspace. The function supports loading data from files or folders, with options for file format and CSV settings.

Aliases: Import-FabricLakehouseTableData

Examples

Example 1

This example loads data from a CSV file into the specified table in the Lakehouse.

Import-FabricLakehouseTableData -WorkspaceId "your-workspace-id" -LakehouseId "your-lakehouse-id" -TableName "your-table-name" -PathType "File" -RelativePath "path/to/your/file.csv" -FileFormat "CSV" -CsvDelimiter "," -CsvHeader $true -Mode "append" -Recursive $false

Example 2

This example loads data from a folder into the specified table in the Lakehouse, overwriting any existing data.

Import-FabricLakehouseTableData -WorkspaceId "your-workspace-id" -LakehouseId "your-lakehouse-id" -TableName "your-table-name" -PathType "Folder" -RelativePath "path/to/your/folder" -FileFormat "Parquet" -Mode "overwrite" -Recursive $true

Parameters

NameTypeReq.Pos.PipelineDescription
-FileFormat string ✓Required 5 –

The format of the file to load data from (CSV or Parquet).

-LakehouseId guid ✓Required 1 –

The ID of the Lakehouse where the table resides.

-Mode string ✓Required 8 –

The mode for loading data (append or overwrite).

Default: append
-PathType string ✓Required 3 –

The type of path to load data from (File or Folder).

-RelativePath string ✓Required 4 –

The relative path to the file or folder to load data from.

-TableName string ✓Required 2 –

The name of the table to load data into.

-WorkspaceId guid ✓Required 0 –

The ID of the workspace containing the Lakehouse.

-Confirmalias: cf switch Named –

Prompts you for confirmation before running the cmdlet.

-CsvDelimiter string 6 –

The delimiter used in the CSV file (default is comma).

Default: ,
-CsvHeader bool 7 –

Indicates whether the CSV file has a header row (default is false).

Default: False
-Recursive bool 9 –

Indicates whether to load data recursively from subfolders (default is false).

Default: False
-WhatIfalias: wi switch Named –

Runs the command in a mode that only reports what would happen without performing the actions.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

Author: Tiago Balabuch, Kamil Nowinski