我在两个实体之间进行联接操作:
S1_JOINTURE = JOIN E1ERCFI BY (CD_SI, IDT_ETT_CTR) LEFT OUTER, E1EPCTR BY (CD_SI, IDT_ETT_CTR);
S1 = FOREACH S1_JOINTURE GENERATE
E1EPCTR::CD_SI AS CD_SI,
E1EPCTR::IDT_ETT_CTR AS IDT_ETT_CTR;
STORE S1 INTO '$PathDataWorkingFile' USING CSVExcelStorage(',', 'YES_MULTILINE');
请注意,E1ERCFI和E1ERCFI声明为:
E1ERCFI = load_E1ERCFI('$PathE1ERCFI');
E1EPCTR = load_E1EPCTR('$PathE1EPCTR');
用于加载实体的API的位置是:
DEFINE load_E1ERCFI(file) RETURNS LOAD_E1ERCFI {
$LOAD_E1ERCFI = LOAD '$file' USING CSVExcelStorage(',', 'YES_MULTILINE') AS (
CD_TY_TT:chararray,
DA_TT:chararray,
A_ARR:chararray,
M_ARR:chararray,
CD_ETS:chararray,
CD_SI:chararray,
CD_EFS:chararray,
DA_ARR:chararray,
CD_BT:chararray,
IDT_ETT_PSE:chararray,
IDT_ETT_CTR:chararray,
TX_CCF_1_A:BigDecimal,
TX_LGD_1_A:BigDecimal,
CD_ETA_CNC:chararray,
DA_DBT_STA:chararray,
DA_PAS_PTE:chararray,
CD_NOT_OCT:chararray,
CD_NOT_DA_ARR:chararray,
TX_PBA_DFT_OCT:BigDecimal,
TX_PBA_DFT_ARR:BigDecimal,
CD_GRP_BCK_ARR:chararray,
DA_MOD_BCK:chararray,
CD_TY_ACT_DPRC:chararray,
IDC_RIS_BCK_1:chararray);
};
这是load_E1EPCTR的声明
DEFINE load_E1EPCTR(file) RETURNS LOAD_E1EPCTR {
$LOAD_E1EPCTR = LOAD '$file' USING CSVExcelStorage(',', 'YES_MULTILINE') AS (
CD_TY_TT:chararray,
DA_TT:chararray,
A_ARR:chararray,
M_ARR:chararray,
CD_ETS:chararray,
CD_SI:chararray,
IDT_ETT_PSE:chararray,
IDT_ETT_CTR:chararray,
CD_EFS_CTR:chararray,
CD_EFS_PSE:chararray,
CD_QUL_SGN_PSE:chararray,
DA_SGN_PSE_CTR:chararray,
CD_CRV_CIA_ORI:chararray);
};
除非两个实体中都存在CD_SI和IDT_ETT_CTR,否则我为什么要清空输出?
不是很奇怪我的输出S1中有空结果吗?