I am trying to write a query where
with tmp_tree(
child,
parent,
level
)
as
(
select
child,
parent,
level
from tree A
where parent= ‘A’ and
A.child !=A.parent
union all
select
child,
parent,
level
from tree A ,tmp_tree tmp
tmp.NodeId=A.ParentNodeId
and A.ParentNodeId=‘A’
and tmp.child = A.child
and A.child !=A.parent
and A.level > tmp.level
)
select *
from tmp_tree
table tmp_tree not found
Is it that - Dremio does not support recursion - is there some other way to get this dataset ?
No i dont have this as PDS or VDS … i wrote this as a like to like migration of SQL to Dremio
Do i have to create a PDS\VDS for this to work im Dremio ?
Well normally you add a source first. i.e. like Mongo, then you’ll see the collections within that source and can promote it to a physical dataset (PDS) run queries there and save as a VDS from there.
Make sure you enable exports for the sources (not tables, but sources)–I missed this detail, and kept getting errors like “[x source] is immutable for user” until I read the documentation more closely and figured it out.