Table1:
LOAD * INLINE [
ID|Phrase
1 | 'The transaction was complete, but the order has not yet shipped.'
2 | 'We need to confirm the following details: sales rep number, order status, and shipping priority.'
] (Delimiter is '|');
Table2:
LOAD * INLINE [
Num1:Chr1
1:A
2:B ] (Delimiter is ':');
Table3:
LOAD * INLINE [
Num2\Chr2
1\A
2\B ] (Delimiter is \\);
Table4:
LOAD * INLINE [
Num3 Chr3
1 A
2 B ] (Delimiter is '\t');
结果
加载数据并打开工作表。创建四个表,并按如下方式添加维度:
Table1:ID,Phrase
Table2:Num1,Chr1
Table3:Num2,Chr2
Table4:Num3,Chr3
结果表: Table1
ID
Phrase
1
The transaction was complete, but the order has not yet shipped.
2
We need to confirm the following details: sales rep number, order status, and shipping priority.
在这个截断的示例中,我们从数据连接加载一个订单详细信息表。然后,我们使用一个内联表来添加一个额外的字段 Supplemental Info。例如,这可能包含有关特定订单 ID 的特殊注释的详细信息。
加载脚本
SET DateFormat='MM/DD/YYYY';
Orders:
LIB CONNECT TO 'My_Generic_Connection';
LOAD PRODUCT_DIVISION_A_ORDER_ID as Order ID,
PRODUCT_DIVISION_A_ORDER_DATE as ISSUE_KEY as Order Date,
PRODUCT_DIVISION_A_TYPE as Product Type,
PRODUCT_DIVISION_A_SALES_MANAGER as Manager,
PRODUCT_DIVISION_A_SHIPPED_STATUS as Shipped Status;
SELECT PRODUCT_DIVISION_A_ORDER_ID,
PRODUCT_DIVISION_A_ORDER_DATE,
PRODUCT_DIVISION_A_TYPE,
PRODUCT_DIVISION_A_SALES_MANAGER,
PRODUCT_DIVISION_A_SHIPPED_STATUS
FROM SourceTable
WITH PROPERTIES (
[...]
);
Orders_Inline_Info:
load * inline [
Order ID,Supplemental Info
PSF-001014,'Bulk order, pending deal with Paracel.'
PSF-001625,'NOTE: Product damaged. Investigation required.'
];
结果
加载数据后,假设我们将以下维度添加到表中:
Order ID
Order Date
Product Type
Manager
Shipped Status
Supplemental Info
生成的图表可能是这样的。
结果表:Orders
Order ID
Order Date
Product Type
Manager
Shipped Status
Supplemental Info
PSF-000998
1/13/2024
Electronics
Amanda Honda
Shipped
-
PSF-000999
1/15/2024
Automotive
Molly McKenzie
Not Shipped
-
PSF-001014
1/17/2024
Home Appliances
Amalia Craig
Undefined
Bulk order, pending deal with Paracel.
PSF-001625
1/21/2024
Electronics
Amanda Honda
Undefined
Product damaged. Investigation required.
请注意如何将两个表中的所有字段添加到同一可视化中。这些表在数据模型中相互关联。
示例 - 省略列标题
编辑格式规范以加载内联表,而不定义列标题。这是通过 labels 规范完成的(将其设置为 no labels 的值)。有关更多信息,请参阅在内联加载中配置格式规范。