다음을 통해 공유


델타용 OneLake 테이블 API 시작

OneLake는 Microsoft Fabric의 테이블과 상호 작용하기 위한 REST API 엔드포인트를 제공합니다. 이 엔드포인트는 Fabric의 델타 테이블에 대한 읽기 전용 메타데이터 작업을 지원합니다. 이러한 작업은 Unity 카탈로그 API 개방형 표준과 호환됩니다.

중요합니다

이 기능은 프리뷰 상태입니다.

요청 및 응답 예제

이러한 예제 요청 및 응답은 OneLake 테이블 API 엔드포인트에서 현재 지원되는 Delta API 작업의 사용을 보여 줍니다.

이러한 각 작업에 대해 다음을 수행합니다.

  • <BaseUrl>https://onelake.table.fabric.microsoft.com/delta인 경우
  • <Workspace>/DataItem > 은 다음과 같습니다.
    • <WorkspaceID>/<DataItemID>이며, 12345678-abcd-4fbd-9e50-3937d8eb1915/98765432-dcba-4209-8ac2-0821c7f8bd91과(와) 같습니다.
    • <WorkspaceName>/<DataItemName>.<DataItemType>은 두 이름에 특수 문자가 포함되지 않은 경우에 MyWorkspace/MyItem.Lakehouse와 같이 사용할 수 있습니다.
      문자.
  • <Token> 는 인증에 성공하면 Microsoft Entra ID에서 반환하는 액세스 토큰 값입니다.

스키마 나열

패브릭 데이터 항목 내의 스키마를 나열합니다.

  • 요청
curl -X GET \
  "<BaseUrl>/<Workspace>/testlh.Lakehouse/api/2.1/unity-catalog/schemas?catalog_name=testlh.Lakehouse" \
  -H "Authorization: Bearer <Token>" \
  -H "Content-Type: application/json"
  • 응답
200 OK
{
"schemas": [
	{
		"name": "dbo",
		"catalog_name": "testlh.Lakehouse",
        "full_name": "testlh.Lakehouse.dbo",
		"created_at": 1759768029062,
		"updated_at": 1759768029062,
		"comment": null,
		"properties": null,
		"owner": null,
		"created_by": null,
		"updated_by": null,
		"schema_id": null
	}
],
"next_page_token": null
}

테이블 목록

지정된 스키마 내의 테이블을 나열합니다.

  • 요청
curl -X GET \
  "<BaseUrl>/<Workspace>/testlh.Lakehouse/api/2.1/unity-catalog/tables?catalog_name=testlh.Lakehouse&schema_name=dbo" \
  -H "Authorization: Bearer <Token>" \
  -H "Content-Type: application/json"
  • 응답
200 OK
{
"tables": [
    {
        "name": "product_table",
        "catalog_name": "testlh.Lakehouse",
        "schema_name": "dbo",
        "table_type": null,
        "data_source_format": "DELTA",
        "columns": null,
        "storage_location": "https://onelake.dfs.fabric.microsoft.com/.../.../Tables/product_table",
        "comment": null,
        "properties": null,
        "owner": null,
        "created_at": null,
        "created_by": null,
        "updated_at": null,
        "updated_by": null,
        "table_id": null
    }
],
"next_page_token": null
}

테이블 가져오기

지정된 테이블에 대한 테이블 세부 정보를 가져옵니다.

요청

curl -X GET \
  "<BaseUrl>/<Workspace>/testlh.Lakehouse/api/2.1/unity-catalog/tables/testlh.Lakehouse.dbo.product_table" \
  -H "Authorization: Bearer <Token>" \
  -H "Content-Type: application/json"

응답

    200 OK
    {
	"name": "product_table",
	"catalog_name": "testlh.Lakehouse",
	"schema_name": "dbo",
	"table_type": null,
	"data_source_format": "DELTA",
	"columns": [
		{
			"name": "product_id",
			"type_text": null,
			"type_json": null,
			"type_name": "string",
			"type_precision": 0,
			"type_scale": 0,
			"type_interval_type": null,
			"comment": null,
			"partition_index": 0,
			"position": 0,
			"nullable": true
		},
		{
			"name": "product_name",
			"type_text": null,
			"type_json": null,
			"type_name": "string",
			"type_precision": 0,
			"type_scale": 0,
			"type_interval_type": null,
			"comment": null,
			"partition_index": 0,
			"position": 1,
			"nullable": true
		},
		{
			"name": "category",
			"type_text": null,
			"type_json": null,
			"type_name": "string",
			"type_precision": 0,
			"type_scale": 0,
			"type_interval_type": null,
			"comment": null,
			"partition_index": 0,
			"position": 2,
			"nullable": true
		},
		{
			"name": "brand",
			"type_text": null,
			"type_json": null,
			"type_name": "string",
			"type_precision": 0,
			"type_scale": 0,
			"type_interval_type": null,
			"comment": null,
			"partition_index": 0,
			"position": 3,
			"nullable": true
		},
		{
			"name": "price",
			"type_text": null,
			"type_json": null,
			"type_name": "double",
			"type_precision": 0,
			"type_scale": 0,
			"type_interval_type": null,
			"comment": null,
			"partition_index": 0,
			"position": 4,
			"nullable": true
		},
		{
			"name": "launch_date",
			"type_text": null,
			"type_json": null,
			"type_name": "date",
			"type_precision": 0,
			"type_scale": 0,
			"type_interval_type": null,
			"comment": null,
			"partition_index": 0,
			"position": 5,
			"nullable": true
		}
	],
	"storage_location": "https://onelake.dfs.fabric.microsoft.com/.../.../Tables/product_table",
	"comment": null,
	"properties": null,
	"owner": null,
	"created_at": 1759703452000,
	"created_by": null,
	"updated_at": 1759703452000,
	"updated_by": null,
	"table_id": "df2b3038-c21a-429d-90b8-f3bbf2d3db5d"
    }