Skip to main content

Template

In summary, a

Template describes all components of a solution spanning ingestion, transformation, simulation, optimisation, visualisation and user/system interaction, with respect to data

Classes

  • ModuleBuilder

Other

DynamicModule

Ƭ DynamicModule: Object

A dynamic namespace for template components, that can be instantiated at runtime

Type declaration

NameType
moduleModulePath
namestring
streamStream<DictType>
type"dynamic"

DynamicModulePathComponent

Ƭ DynamicModulePathComponent: Object

A component of the path identifying the location of a module inside a template

Type declaration

NameType
key_typeStringType
namestring
type"dynamic"

Module

Ƭ Module:

StaticModule | DynamicModule

A namespace for template components


ModulePath

Ƭ ModulePath:

ModulePathComponent[]

A path from the template root to a module


ModulePathComponent

Ƭ ModulePathComponent:

StaticModulePathComponent | DynamicModulePathComponent

A component of the path identifying the location of a module


StaticModule

Ƭ StaticModule: Object

A static namespace for template components

Type declaration

NameType
moduleModulePath
namestring
type"static"

StaticModulePathComponent

Ƭ StaticModulePathComponent: Object

A component of the path identifying the location of a module inside a template

Type declaration

NameType
namestring
type"static"

checkImport

checkImport(module, from): void

Check if module is visible inside from, otherwise throw an error.

This is true when the module path of from starts with the module path of module, and false otherwise.

Parameters

NameType
moduleModulePath
fromModulePath

Returns

void


modulePathEqual

modulePathEqual(first, second): boolean

Determine if module is visible inside from.

This is true when the module path of from starts with the module path of module, and false otherwise.

Parameters

NameType
firstModulePath
secondModulePath

Returns

boolean

Project

Project

Ƭ Project: Object

The

Project including Template asset objects.

Type declaration

NameType
assetsRecord<string, string>
namestring

Template

Template

Ƭ Template: Object

The

Template describing an end-to-end solution.

Type declaration

NameTypeDescription
defaults?Record<string, DefaultDeploymentValue>the collection of DefaultDeploymentValues in the solution
layouts?Record<string, LayoutVisual>the collection of LayoutVisuals in the solution
modules?Record<string, Module>the collection of Modules in the solution
streams?Record<string, Stream>the collection of Streams in the solution
tasks?Record<string, TaskDescription>the collection of TaskDescriptions in the solution

Template

Template(...inputs):

Template

Merge multiple

Template or Builder objects together.

Parameters

NameTypeDescription
...inputs(Builder | Template)[]the Template or Builder objects to merge

Returns

Template

a merged

Template

Example

 const clock = new SourceBuilder("Hourly")
.clock({ cron: "0 * * * *" })

const pipeline = new PipelineBuilder("BasicAuth")
.from(clock.outputStream())
.transform((value) => StringJoin`The value is ${value}`)

// create a resulting template
const template = Template(
clock,
pipeline,
)

TemplateDifference

TemplateDifference(first, second): TemplateUpdate

Calculate the difference between two templates.

Parameters

NameTypeDescription
firstTemplatethe Template to difference
secondTemplatethe Template to difference

Returns

TemplateUpdate

a TemplateUpdate


applyTemplateUpdate

applyTemplateUpdate(template, update):

Template

Apply a difference to a Template.

Parameters

NameTypeDescription
templateTemplatethe Template to apply the difference to
updateTemplateUpdatethe Template difference

Returns

Template

a updated

Template


checkTemplate

checkTemplate(template): void

Check that a template is a valid DAG.

Parameters

NameTypeDescription
templateTemplatethe Template or Builder objects to merge

Returns

void