表格是
對於 Excel、XML 或 Parquet 檔案,您可以在表格格式規範中指定正在從中載入資料的表格。
語法:
Table is table name
引數:
引數 | 描述 |
---|---|
table name |
指定表格名稱。值取決於表格格式:
|
範例: Excel
LOAD
"Item Number",
"Product Group",
"Product Line",
"Product Sub Group",
"Product Type"
FROM [lib://AttachedFiles/Item master.xlsx]
(ooxml, embedded labels, table is [Item master]);
範例: XML
LOAD
city%Table,
%Key_row_7FAC1F878EC01ECB
FROM [lib://AttachedFiles/cities.xml]
(XmlSimple, table is [root/row/country/city]);
範例: Parquet
檔案 company.parquet 包含下列結構描述:
company (String)
contact (String)
company:salesrep (List)
salesrep (Group)
salesrep (String)
company:headquarter (List)
headquarter (Group)
country (String)
city (String)
city:region (List)
region (Group)
region (String)
以下會將內容從檔案載入到表格中。第一個 LOAD 陳述式載入根群組。第二個 LOAD 陳述式載入 salesrep 群組的內容作為表格。第三個載入 headquarter 群組作為表格。第四個載入 region 群組作為表格。
LOAD * FROM […] (parquet);
LOAD * FROM […] (parquet, table is [company:salesrep.salesrep]);
LOAD * FROM […] (parquet, table is [company:headquarter.headquarter]
LOAD * FROM […] (parquet, table is [company:headquarter.headquarter.city:region.region]
限制:
Table is 規範只與 Excel、XML 或 Parquet 檔案有關。