Hi Paul,
Apologies in my delay in replying (work kept getting in the way). Here is the query plan (I am not sure how to set text mode):
prefix : <tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:model:>
prefix xsd: <http://www.w3.org/2001/XMLSchema>
From virtual
Slice(offset=0, limit=1000) [#475]
`β OrderBy(DESC(?price), offset=0, limit=1000) [#475]
`β Distinct [#475]
`β Projection(?full_name, ?city, ?price, ?product_name) [#475]
`β Bind("Texas" AS ?state) sortedBy=?state [#475]
`β HashJoin(?customer) [#475]
+β Union [#860]
β +β Union [#360]
β β +β Union [#270]
β β β +β Union [#180]
β β β β +β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Databricks-C360-Demo-Database> [#90] {
β β β β β +β RelNode=
β β β β β +β LogicalProject(cid=[$1])
β β β β β +β LogicalFilter(condition=[IS NOT NULL($1)])
β β β β β +β JdbcTableScan(table=[[jamie_costabile, stardog, rewards]])
β β β β β +β Query=
β β β β β +β SELECT `cid`
β β β β β +β FROM `jamie_costabile`.`stardog`.`rewards`
β β β β β +β WHERE `cid` IS NOT NULL
β β β β β +β Vars=
β β β β β +β ?customer <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:stardog_demo.c360.Customers:{cid/0})
β β β β β } [#90]
β β β β `β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Databricks-C360-Demo-Database> [#90] {
β β β β +β RelNode=
β β β β +β LogicalProject(cid=[$1])
β β β β +β LogicalFilter(condition=[IS NOT NULL($1)])
β β β β +β JdbcTableScan(table=[[jamie_costabile, stardog, creditcards]])
β β β β +β Query=
β β β β +β SELECT `cid`
β β β β +β FROM `jamie_costabile`.`stardog`.`creditcards`
β β β β +β WHERE `cid` IS NOT NULL
β β β β +β Vars=
β β β β +β ?customer <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:stardog_demo.c360.Customers:{cid/0})
β β β β } [#90]
β β β `β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Databricks-C360-Demo-Database> [#90] {
β β β +β RelNode=
β β β +β LogicalProject(cid=[$0])
β β β +β LogicalFilter(condition=[IS NOT NULL($0)])
β β β +β JdbcTableScan(table=[[jamie_costabile, stardog, us_customers]])
β β β +β Query=
β β β +β SELECT `cid`
β β β +β FROM `jamie_costabile`.`stardog`.`us_customers`
β β β +β WHERE `cid` IS NOT NULL
β β β +β Vars=
β β β +β ?customer <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:stardog_demo.c360.Customers:{cid/0})
β β β } [#90]
β β `β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Databricks-C360-Demo-Database> [#90] {
β β +β RelNode=
β β +β LogicalProject(cid=[$6])
β β +β LogicalFilter(condition=[IS NOT NULL($6)])
β β +β JdbcTableScan(table=[[jamie_costabile, stardog, purchases]])
β β +β Query=
β β +β SELECT `cid`
β β +β FROM `jamie_costabile`.`stardog`.`purchases`
β β +β WHERE `cid` IS NOT NULL
β β +β Vars=
β β +β ?customer <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:stardog_demo.c360.Customers:{cid/0})
β β } [#90]
β `β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Azure-C360-Demo-Database> [#500] {
β +β RelNode=
β +β LogicalProject(cid=[$0])
β +β JdbcTableScan(table=[[stardog_demo, c360, Customers]])
β +β Query=
β +β SELECT [cid]
β +β FROM [stardog_demo].[c360].[Customers]
β +β Vars=
β +β ?customer <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:stardog_demo.c360.Customers:{cid/0})
β } [#500]
`β HashJoin(?address) [#280]
+β Union [#630]
β +β Union [#540]
β β +β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__TJC-Databricks> [#90] {
β β β +β RelNode=
β β β +β LogicalProject(location=[$47])
β β β +β LogicalFilter(condition=[IS NOT NULL($47)])
β β β +β JdbcTableScan(table=[[hive_metastore, temp, t_hco_to_delete]])
β β β +β Query=
β β β +β SELECT `location`
β β β +β FROM `hive_metastore`.`temp`.`t_hco_to_delete`
β β β +β WHERE `location` IS NOT NULL
β β β +β Vars=
β β β +β ?address <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:jamie_costabile.stardog.us_locations:{location/0})
β β β } [#90]
β β `β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Azure-C360-Demo-Database> [#450] {
β β +β RelNode=
β β +β LogicalProject(location=[$6])
β β +β LogicalFilter(condition=[IS NOT NULL($6)])
β β +β JdbcTableScan(table=[[stardog_demo, c360, Customers]])
β β +β Query=
β β +β SELECT [location]
β β +β FROM [stardog_demo].[c360].[Customers]
β β +β WHERE [location] IS NOT NULL
β β +β Vars=
β β +β ?address <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:jamie_costabile.stardog.us_locations:{location/0})
β β } [#450]
β `β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Databricks-C360-Demo-Database> [#90] {
β +β RelNode=
β +β LogicalProject(id=[$0])
β +β LogicalFilter(condition=[IS NOT NULL($0)])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, us_locations]])
β +β Query=
β +β SELECT `id`
β +β FROM `jamie_costabile`.`stardog`.`us_locations`
β +β WHERE `id` IS NOT NULL
β +β Vars=
β +β ?address <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:jamie_costabile.stardog.us_locations:{id/0})
β } [#90]
`β HashJoin(?customer) [#179]
+β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Azure-C360-Demo-Database> [#405] {
β +β RelNode=
β +β LogicalProject(cid=[$0], location=[$6], full_name=[$7])
β +β LogicalFilter(condition=[AND(IS NOT NULL($6), IS NOT NULL($7))])
β +β JdbcTableScan(table=[[stardog_demo, c360, Customers]])
β +β Query=
β +β SELECT [cid], [location], [full_name]
β +β FROM [stardog_demo].[c360].[Customers]
β +β WHERE [location] IS NOT NULL AND [full_name] IS NOT NULL
β +β Vars=
β +β ?customer <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:stardog_demo.c360.Customers:{cid/0})
β +β ?address <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:jamie_costabile.stardog.us_locations:{location/1})
β +β ?full_name <- COLUMN($2)^^xsd:string
β } [#405]
`β HashJoin(?product) [#180]
+β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Databricks-C360-Demo-Database> [#222] {
β +β RelNode=
β +β LogicalProject(id=[$0], id1=[$18], product=[$19], cid1=[$25], phone=[$30], price2=[$47], id4=[$51], city=[$57])
β +β LogicalJoin(condition=[=($25, $73)], joinType=[inner])
β +β LogicalJoin(condition=[=($25, $65)], joinType=[inner])
β +β LogicalJoin(condition=[AND(=($51, $58), =($62, 'Texas'))], joinType=[inner])
β +β LogicalJoin(condition=[AND(IS NOT NULL($51), IS NOT NULL($57))], joinType=[inner])
β +β LogicalJoin(condition=[AND(=($0, $42), >($47, '10000':VARCHAR(2048)))], joinType=[inner])
β +β LogicalJoin(condition=[AND(=($0, $33), =($25, $39))], joinType=[inner])
β +β LogicalJoin(condition=[IS NOT NULL($30)], joinType=[inner])
β +β LogicalJoin(condition=[AND(=($10, $18), =('highlighters':VARCHAR(2048), LOWER($19)), IS NOT NULL($19))], joinType=[inner])
β +β LogicalJoin(condition=[=($0, $9)], joinType=[inner])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, purchases]])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, purchases]])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, products]])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, us_customers]])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, purchases]])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, purchases]])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, us_locations]])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, us_locations]])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, us_customers]])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, us_customers]])
β +β Query=
β +β SELECT `purchases`.`id`, `products`.`id` `id1`, `products`.`product`, `us_customers`.`cid` `cid1`, `us_customers`.`phone`, `purchases2`.`price` `price2`, `us_locations`.`id` `id4`, `us_locations`.`city`
β +β FROM `jamie_costabile`.`stardog`.`purchases`
β +β INNER JOIN `jamie_costabile`.`stardog`.`purchases` `purchases0` ON `purchases`.`id` = `purchases0`.`id`
β +β INNER JOIN `jamie_costabile`.`stardog`.`products` ON `purchases0`.`pid` = `products`.`id` AND 'highlighters' = LOWER(`products`.`product`) AND `products`.`product` IS NOT NULL
β +β INNER JOIN `jamie_costabile`.`stardog`.`us_customers` ON `us_customers`.`phone` IS NOT NULL
β +β INNER JOIN `jamie_costabile`.`stardog`.`purchases` `purchases1` ON `purchases`.`id` = `purchases1`.`id` AND `us_customers`.`cid` = `purchases1`.`cid`
β +β INNER JOIN `jamie_costabile`.`stardog`.`purchases` `purchases2` ON `purchases`.`id` = `purchases2`.`id` AND `purchases2`.`price` > '10000'
β +β INNER JOIN `jamie_costabile`.`stardog`.`us_locations` ON `us_locations`.`id` IS NOT NULL AND `us_locations`.`city` IS NOT NULL
β +β INNER JOIN `jamie_costabile`.`stardog`.`us_locations` `us_locations0` ON `us_locations`.`id` = `us_locations0`.`id` AND `us_locations0`.`state` = 'Texas'
β +β INNER JOIN `jamie_costabile`.`stardog`.`us_customers` `us_customers0` ON `us_customers`.`cid` = `us_customers0`.`cid`
β +β INNER JOIN `jamie_costabile`.`stardog`.`us_customers` `us_customers1` ON `us_customers`.`cid` = `us_customers1`.`cid`
β +β Vars=
β +β ?customer <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:stardog_demo.c360.Customers:{cid/3})
β +β ?address <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:jamie_costabile.stardog.us_locations:{id/6})
β +β ?city <- COLUMN($7)^^xsd:string
β +β ?contactInfo <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:ContactInfo:{cid/3})
β +β ?phone <- COLUMN($4)^^xsd:string
β +β ?order <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:Orders:{id/0})
β +β ?price <- COLUMN($5)^^xsd:double
β +β ?product <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:jamie_costabile.stardog.products:{id/1})
β +β ?product_name <- COLUMN($2)^^xsd:string
β } [#222]
`β Union [#180]
+β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Databricks-C360-Demo-Database> [#90] {
β +β RelNode=
β +β LogicalProject(id=[$0])
β +β LogicalFilter(condition=[IS NOT NULL($0)])
β +β JdbcTableScan(table=[[jamie_costabile, stardog, products]])
β +β Query=
β +β SELECT `id`
β +β FROM `jamie_costabile`.`stardog`.`products`
β +β WHERE `id` IS NOT NULL
β +β Vars=
β +β ?product <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:jamie_costabile.stardog.products:{id/0})
β } [#90]
`β VirtualGraphSql<virtual://TJC-C360-Demo-Update-Azure-DB__data__Databricks-C360-Demo-Database> [#90] {
+β RelNode=
+β LogicalProject(pid=[$1])
+β LogicalFilter(condition=[IS NOT NULL($1)])
+β JdbcTableScan(table=[[jamie_costabile, stardog, purchases]])
+β Query=
+β SELECT `pid`
+β FROM `jamie_costabile`.`stardog`.`purchases`
+β WHERE `pid` IS NOT NULL
+β Vars=
+β ?product <- TEMPLATE(tag:stardog:designer:TJC-C360-Demo-Update-Azure-DB:data:jamie_costabile.stardog.products:{pid/0})
} [#90]
I searched for "service" by copying the text into vim without finding any matches.