Table is
对于 Excel、XML 或 Parquet 文件,可以在表格式说明符中指定要从中加载数据的表。
语法:
Table is table name
参数:
参数 | 描述 |
---|---|
table name |
指定表的名称。该值取决于表格式:
|
示例: Excel
LOAD
"Item Number",
"Product Group",
"Product Line",
"Product Sub Group",
"Product Type"
FROM [lib://DataFiles/Item master.xlsx]
(ooxml, embedded labels, table is [Item master]);
示例: 数据截断,
LOAD
city%Table,
%Key_row_7FAC1F878EC01ECB
FROM [lib://DataFiles/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 组的内容加载为一个表。第三个 LOAD 语句将总部组加载为一个表。第四个 LOAD 语句将地区组加载为表。
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 文件相关。