Using latest version of Dremio community edition 1.3.1-201712020438070881-a7af5c8
Created a dataset based on following query (MYSQL source)
select
salesorderheader.SalesOrderID
, SalesOrderDetailID
,RevisionNumber
,OrderDate
,DueDate
,ShipDate
,Status
,OnlineOrderFlag
,SalesOrderNumber
,PurchaseOrderNumber
,AccountNumber
,CustomerID
,ContactID
,SalesPersonID
,salesorderheader.TerritoryID
,billaddress.addressline1 bill_addressline1
,billaddress.addressline2 bill_addressline2
,billaddress.city bill_city
,billstate.stateprovincecode bill_state
,billstate.countryregioncode bill_countrycode
,ShipToAddressID
,shipaddress.addressline1 ship_addressline1
,shipaddress.addressline2 ship_addressline2
,shipaddress.city ship_city
,shipstate.stateprovincecode ship_state
,shipstate.countryregioncode ship_countrycode
,shipmethod.name as shipmethod
,CreditCardID
,CreditCardApprovalCode
, Comment
, CarrierTrackingNumber
, OrderQty
, ProductID
, SpecialOfferID
, UnitPrice
, UnitPriceDiscount
, LineTotal
from mysql_ps2.adventureworks.salesorderheader
inner join mysql_ps2.adventureworks.salesorderdetail on salesorderheader.salesorderid = salesorderdetail.salesorderid
left join mysql_ps2.adventureworks.address as billaddress on salesorderheader.billtoaddressid = billaddress.addressid
left join mysql_ps2.adventureworks.address as shipaddress on salesorderheader.shiptoaddressid = shipaddress.addressid
left join mysql_ps2.adventureworks.stateprovince as billstate on billaddress.stateprovinceid = billstate.stateprovinceid
left join mysql_ps2.adventureworks.stateprovince as shipstate on shipaddress.stateprovinceid = shipstate.stateprovinceid
left join mysql_ps2.adventureworks.shipmethod on salesorderheader.ShipMethodID = shipmethod.ShipMethodID
Defined raw and aggregate reflections on the data set
Ran following query on dataset (reflection not used)
select territoryid, sum(“OrderQty”),
sum(“UnitPrice”), sum(“UnitPriceDiscount”), sum(“LineTotal”)
from “dw_adworks”.“f_sales” group by territoryid
Now converted the query for dataset as view in MYSQL, created exact same reflections on the new data set based on view in MYSQL, ran the same query again and Dremio used reflection
Any explanation for this behavior?
The behavior is consistent with other queries as well
— when dataset is based on query
– when dataset is based on VW based on same query