I am trying to import my data to power bi, which gives me the data as below PL/SQL:
SELECT
A.WINDOW,
A.ROUTE,
A.WEBORDERNUM,
min(A.SCANDATE)
FROM
SCANNING A
WHERE
(
A.CARTONSTATUS IN ( 'DELIVERED','REFUSED' )
AND
( A.SCANDATE >TRUNC(SYSDATE)+1/24)
)
Group by
A.WINDOW,
A.ROUTE,
A.WEBORDERNUM
I import the scanning table in power bi, and do the following steps:
Then I go to view my sql statement in Power BI, and It looks like that:
select "rows"."WEBORDERNUM" as "WEBORDERNUM",
"rows"."ROUTE" as "ROUTE",
"rows"."WINDOW" as "WINDOW",
min("rows"."SCANDATE") as "Min Scan"
from
(
select "_"."SCANDATE",
"_"."WEBORDERNUM",
"_"."ROUTE",
"_"."WINDOW"
from "AIRCLIC_PROD"."CARTONTRACKING" "_"
where "_"."SCANDATE" > TO_TIMESTAMP('2018-06-26 01:00:00','YYYY-MM-DD HH24:MI:SS.FF') and ("_"."CARTONSTATUS" = 'DELIVERED' and "_"."CARTONSTATUS" is not null or "_"."CARTONSTATUS" = 'REFUSED' and "_"."CARTONSTATUS" is not null)
) "rows"
group by "WEBORDERNUM",
"ROUTE",
"WINDOW"
I think they are exactly the same, but I am not sure it takes more than 5 mins to import the data in power bi, but when I run the query in Toad, it only take last than 1 sec.
Anyone has an idea?