我在 QlikSense 数据加载编辑器中通过此 SQL 查询加载了如下表格,
[RESOURCE_ALLOCATION]:
select t.rec_id as RESOURCE_ALLOC_TASKID,
t.name as RESOURCE_ALLOC_TASKNAME,
t.actual_starttime as RESOURCE_ALLOC_STARTTIME,
t.actual_endtime as RESOURCE_ALLOC_ENDTIME,
extract(year from t.actual_starttime) as RESOURCE_ALLOC_YEAR,
(t.actual_endtime - t.actual_starttime) as RESOURCE_ALLOC_DAYS,
t.resource_id as RESOURCE_ALLOC_ERSOURCEID,
r.name as RESOURCE_ALLOC_ERSOURCENAME
from public.dsh_project_tasks t, public.dsh_resources r
where t.resource_id = r.rec_id and extract(year from t.actual_starttime) = extract (year from t.actual_endtime);
然后我试图通过在加载数据编辑器中的上面一个查询之后的另一个查询从最后加载的表 [RESOURCE_ALLOCATION] 中选择来加载另一个表,如下所示
[Resource_Utilization]:
load rr.RESOURCE_ALLOC_ERSOURCENAME as busy_resourcename,
rr.RESOURCE_ALLOC_YEAR as busy_resourceyear,
Sum(rr.RESOURCE_ALLOC_DAYS) as busy_resourceDays,
if(Sum(rr.RESOURCE_ALLOC_DAYS) < 368, 'busy', 'free')as BUSY_RESOURCESTATUS
from RESOURCE_ALLOCATION rr
group by rr.RESOURCE_ALLOC_ERSOURCENAME, rr.RESOURCE_ALLOC_YEAR;
[Resource_Utilization]:
load rr.RESOURCE_ALLOC_ERSOURCENAME as busy_resourcename,
rr.RESOURCE_ALLOC_YEAR as busy_resourceyear,
(365 - Sum(rr.RESOURCE_ALLOC_DAYS)) as busy_resourceDays,
if((365 - Sum(rr.RESOURCE_ALLOC_DAYS)) < 366, 'free', 'busy') as BUSY_RESOURCESTATUS
from resource_allocation rr
group by rr.RESOURCE_ALLOC_ERSOURCENAME, rr.RESOURCE_ALLOC_YEAR;
但我在加载数据时出错,说
发生以下错误:无效路径此处发生错误:
[Resource_Utilization]:
load rr.RESOURCE_ALLOC_ERSOURCENAME as busy_resourcename,
rr.RESOURCE_ALLOC_YEAR as busy_resourceyear,
Sum(rr.RESOURCE_ALLOC_DAYS) as busy_resourceDays,
if(Sum(rr.RESOURCE_ALLOC_DAYS) < 368, 'busy', 'free')as BUSY_RESOURCESTATUS
from RESOURCE_ALLOCATION rr group by rr.RESOURCE_ALLOC_ERSOURCENAME, rr.RESOURCE_ALLOC_YEAR
请帮助,尽管相同的查询在数据库控制台中很好地选择了数据,为什么我会收到此错误?