Tables - Load Table

Note

This API is in preview.

Starts a load table operation and returns the operation status URL in the response location header.

This API supports long running operations (LRO).

Permissions

Write permission to the lakehouse item.

Required Delegated Scopes

Lakehouse.ReadWrite.All

Interface

POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/lakehouses/{lakehouseId}/tables/{tableName}/load

URI Parameters

Name In Required Type Description
lakehouseId
path True

string

uuid

The lakehouse item ID.

tableName
path True

string

The table name.

Regex pattern: ^(?=[0-9]*[a-zA-Z_])[a-zA-Z0-9_]{1,256}$

workspaceId
path True

string

uuid

The workspace ID.

Request Body

Name Required Type Description
pathType True

PathType

The type of relativePath, either file or folder. Additional PathType types may be added over time.

relativePath True

string

The relative path of the data file or folder.

fileExtension

string

The file extension of the data file.

formatOptions FileFormatOptions:

Abstract type of data file format options.

mode

ModeType

The load table operation mode, overwrite or append. Additional mode types may be added over time.

recursive

boolean

Indicates whether to search data files recursively or not, when loading a table from a folder.

Responses

Name Type Description
202 Accepted

Request accepted, load table operation is in progress.

Headers

  • Location: string
  • x-ms-operation-id: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

Common error codes:

  • UnknownError - An error occurred.

Examples

Load table operation Example

Sample Request

POST https://api.fabric.microsoft.com/v1/workspaces/f089354e-8366-4e18-aea3-4cb4a3a50b48/lakehouses/41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87/tables/abc123/load

{
  "relativePath": "Files/abc/abc123.csv",
  "pathType": "File",
  "mode": "Overwrite",
  "recursive": false,
  "formatOptions": {
    "format": "Csv",
    "header": true,
    "delimiter": ","
  }
}

Sample Response

Location: https://api.fabric.microsoft.com/v1/operations/abcdef00-9d7e-469a-abf1-fca847a0ea69
x-ms-operation-id: abcdef00-9d7e-469a-abf1-fca847a0ea69
Retry-After: 30

Definitions

Name Description
Csv

CSV format options for CSV files.

ErrorRelatedResource

The error related resource details object.

ErrorResponse

The error response.

ErrorResponseDetails

The error response details.

LoadTableRequest

Represents a load table operation request.

ModeType

The load table operation mode, overwrite or append. Additional mode types may be added over time.

Parquet

Format options for Parquet files.

PathType

The type of relativePath, either file or folder. Additional PathType types may be added over time.

Csv

CSV format options for CSV files.

Name Type Description
delimiter

string

The delimiter of CSV file.

format string:

Csv

Data file format name. Additional file format types may be added over time.

header

boolean

This property indicates whether the CSV data file contains a header line or not.

ErrorRelatedResource

The error related resource details object.

Name Type Description
resourceId

string

The resource ID that's involved in the error.

resourceType

string

The type of the resource that's involved in the error.

ErrorResponse

The error response.

Name Type Description
errorCode

string

A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users.

message

string

A human readable representation of the error.

moreDetails

ErrorResponseDetails[]

List of additional error details.

relatedResource

ErrorRelatedResource

The error related resource details.

requestId

string

ID of the request associated with the error.

ErrorResponseDetails

The error response details.

Name Type Description
errorCode

string

A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users.

message

string

A human readable representation of the error.

relatedResource

ErrorRelatedResource

The error related resource details.

LoadTableRequest

Represents a load table operation request.

Name Type Description
fileExtension

string

The file extension of the data file.

formatOptions FileFormatOptions:

Abstract type of data file format options.

mode

ModeType

The load table operation mode, overwrite or append. Additional mode types may be added over time.

pathType

PathType

The type of relativePath, either file or folder. Additional PathType types may be added over time.

recursive

boolean

Indicates whether to search data files recursively or not, when loading a table from a folder.

relativePath

string

The relative path of the data file or folder.

ModeType

The load table operation mode, overwrite or append. Additional mode types may be added over time.

Name Type Description
Append

string

load table in append mode.

Overwrite

string

load table in overwrite mode.

Parquet

Format options for Parquet files.

Name Type Description
format string:

Parquet

Data file format name. Additional file format types may be added over time.

PathType

The type of relativePath, either file or folder. Additional PathType types may be added over time.

Name Type Description
File

string

load table from file.

Folder

string

load table from folder.