Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
Usługa OneLake oferuje punkt końcowy interfejsu API REST do interakcji z tabelami w usłudze Microsoft Fabric. Ten punkt końcowy obsługuje operacje metadanych tylko do odczytu dla tabel Delta w Fabric. Te operacje są zgodne z otwartym standardem Unity Catalog API.
Ważne
Ta funkcja jest dostępna w wersji zapoznawczej.
Przykładowe żądania i odpowiedzi
Te przykładowe żądania i odpowiedzi ilustrują użycie operacji interfejsu API delty obecnie obsługiwanych w punkcie końcowym interfejsu API tabeli OneLake.
Dla każdej z tych operacji:
-
<BaseUrl>jesthttps://onelake.table.fabric.microsoft.com/delta -
<Workspace>/DataItem> może to być:-
<WorkspaceID>/<DataItemID>takie jak12345678-abcd-4fbd-9e50-3937d8eb1915/98765432-dcba-4209-8ac2-0821c7f8bd91 -
<WorkspaceName>/<DataItemName>.<DataItemType>, na przykładMyWorkspace/MyItem.Lakehouse, o ile obie nazwy nie zawierają znaków specjalnych
znaków.
-
-
<Token>to wartość tokenu dostępu zwrócona przez identyfikator Entra firmy Microsoft po pomyślnym uwierzytelnieniu.
Lista schematów
Wyświetl listę schematów w elemencie danych Fabric.
- Zażądaj
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"
- Odpowiedź
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
}
Lista tabel
Wyświetl tabele w danym schemacie.
- Zażądaj
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"
- Odpowiedź
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
}
Pobieranie tabeli
Pobierz szczegóły tabeli dla danej tabeli.
Zażądaj
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"
Odpowiedź
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"
}
Treści powiązane
- Dowiedz się więcej o interfejsach API tabel OneLake.
- Dowiedz się więcej o API tabel OneLake dla Delta.