napkin-runtime-2.0.0
Safe HaskellNone
LanguageGHC2024

Napkin.Spec.Graph.TasksDAGGraph

Synopsis

Documentation

newtype YAMLTask #

Constructors

YAMLTask 

Fields

Instances

Instances details
Generic YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep YAMLTask 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep YAMLTask = D1 ('MetaData "YAMLTask" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'True) (C1 ('MetaCons "YAMLTask" 'PrefixI 'True) (S1 ('MetaSel ('Just "unYAMLTask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

Methods

from :: YAMLTask -> Rep YAMLTask x #

to :: Rep YAMLTask x -> YAMLTask #

Show YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Eq YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Ord YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep YAMLTask # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep YAMLTask = D1 ('MetaData "YAMLTask" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'True) (C1 ('MetaCons "YAMLTask" 'PrefixI 'True) (S1 ('MetaSel ('Just "unYAMLTask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Artifact #

Instances

Instances details
Generic Artifact # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep Artifact 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep Artifact = D1 ('MetaData "Artifact" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'False) (C1 ('MetaCons "Table" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TableName)) :+: C1 ('MetaCons "UserDefinedFunction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TableName)))

Methods

from :: Artifact -> Rep Artifact x #

to :: Rep Artifact x -> Artifact #

Show Artifact # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Eq Artifact # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Ord Artifact # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep Artifact # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep Artifact = D1 ('MetaData "Artifact" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'False) (C1 ('MetaCons "Table" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TableName)) :+: C1 ('MetaCons "UserDefinedFunction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TableName)))

data TableTaskType #

Constructors

Entry [TaskId]

subgraph tasks Ids

PreHook Int 
CreateAction [UpdateStrategy] 
PostHook Int 
Exit 

Instances

Instances details
Generic TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep TableTaskType 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Show TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Eq TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Ord TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep TableTaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

data TaskType #

Instances

Instances details
Generic TaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep TaskType 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

from :: TaskType -> Rep TaskType x #

to :: Rep TaskType x -> TaskType #

Eq TaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Ord TaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep TaskType # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

data Label #

Instances

Instances details
Generic Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep Label 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

from :: Label -> Rep Label x #

to :: Rep Label x -> Label #

Show Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

showsPrec :: Int -> Label -> ShowS #

show :: Label -> String #

showList :: [Label] -> ShowS #

Eq Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

(==) :: Label -> Label -> Bool #

(/=) :: Label -> Label -> Bool #

Ord Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

compare :: Label -> Label -> Ordering #

(<) :: Label -> Label -> Bool #

(<=) :: Label -> Label -> Bool #

(>) :: Label -> Label -> Bool #

(>=) :: Label -> Label -> Bool #

max :: Label -> Label -> Label #

min :: Label -> Label -> Label #

type Rep Label # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

data Task payload #

Instances

Instances details
Generic (Task payload) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep (Task payload) 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

from :: Task payload -> Rep (Task payload) x #

to :: Rep (Task payload) x -> Task payload #

type Rep (Task payload) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

newtype TasksDAG (kind :: k) b #

Constructors

TasksDAG 

Fields

Instances

Instances details
Default (TasksDAG kind b) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Methods

def :: TasksDAG kind b #

Generic (TasksDAG kind b) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

Associated Types

type Rep (TasksDAG kind b) 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep (TasksDAG kind b) = D1 ('MetaData "TasksDAG" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'True) (C1 ('MetaCons "TasksDAG" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map TaskId (Task (Executable b))))))

Methods

from :: TasksDAG kind b -> Rep (TasksDAG kind b) x #

to :: Rep (TasksDAG kind b) x -> TasksDAG kind b #

type Rep (TasksDAG kind b) # 
Instance details

Defined in Napkin.Spec.Graph.TasksDAGGraph

type Rep (TasksDAG kind b) = D1 ('MetaData "TasksDAG" "Napkin.Spec.Graph.TasksDAGGraph" "napkin-runtime-2.0.0-Ct8w2lsjRa3AUoSevHfCKx" 'True) (C1 ('MetaCons "TasksDAG" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map TaskId (Task (Executable b))))))

data Exec #

data Table #

data Full #

isOkHookResult :: forall {k} (bk :: k). HookResult bk -> Bool #

isOkTaskResult :: forall {k} (bk :: k). TaskResult bk -> Bool #

getTaskStateMemos :: forall {k} (bk :: k). TaskState bk -> Maybe TableMemo #

getTaskResultStats :: forall {k} (bk :: k). HasBackendQueryStats bk => TaskResult bk -> QueryStats bk #

type TasksDAGGraph (kind :: k) b = Gr (Task (Executable b)) () #

tasksToGraph :: forall {k} (kind :: k) b. TasksDAG kind b -> TasksDAGGraph kind b #

tableDownstream :: forall {k} (kind :: k) b. TasksDAGGraph kind b -> Set TaskId -> [Task (Executable b)] #

tableUpstream :: forall {k} (kind :: k) b. TasksDAGGraph kind b -> Set TaskId -> [Task (Executable b)] #

upstreamMap :: forall {k} (kind :: k) b. TasksDAG kind b -> Map TaskId (Set TaskId) #

downstreamMap :: forall {k} (kind :: k) b. TasksDAG kind b -> Map TaskId (Set TaskId, Set TaskId) #

topsort :: forall {k} (kind :: k) b. TasksDAG kind b -> [Task (Executable b)] #

topological graph nodes sort

subgraph :: TasksDAG Full b -> TaskId -> Maybe (Task (Executable b) -> Bool) -> [TaskId] #

transverse Entry node lists of tasks ids checking given property

tags :: Task (Executable b) -> [Text] #

entryNode :: Task (Executable b) -> Maybe [TaskId] #

if is entry node returns subgraph Ids

taskTypeDescription :: TaskType -> Text #

Node type description: Action, Pre Hook, Post Hook, Global Hook, Unmanaged

getDependenciesWithProp :: forall {k1} b (k2 :: k1). (Task (Executable b) -> Bool) -> TasksDAG k2 b -> Task (Executable b) -> Set TaskId #

transverse DAG upstream collecting first node's occurrences satisfying the given property

getDataDependenciesUnmanaged :: forall {k1} (k2 :: k1) b. TasksDAG k2 b -> Task (Executable b) -> Set TaskId #

tablesGraphWithGlobalHooks :: forall {k} (a :: k) b. TasksDAG a b -> TasksDAG Table b #

just table tasks nodes graph, data dependencies and global hooks

tablesGraph' :: TasksDAG Full b -> TasksDAG Table b #

table and unmanaged tasks

cleanupGraph :: TasksDAG Full b -> TasksDAG Exec b #

clean up no runnable nodes, remove NullProgram or not #shouldRun nodes, modifying accordingly edges (optional step)

cleanupGraphProp :: forall {k1} b (k2 :: k1). (Task (Executable b) -> Bool) -> TasksDAG k2 b -> TasksDAG k2 b #

connectAsyncHooks :: forall {k} (t :: k) b. TasksDAG t b -> TasksDAG t b #

Connect async hooks to subgraph's exit node, used to fix async tasks with upstream table selectors