Skip to main content

Pipeline

TL;DR - Pipelines tell Telepath which data to read from a Source.

A Pipeline is a type of Resource that represents a data extraction pipeline that Telepath will use to read training data from a Source. This is done by using a query builder to define the query that should be executed whenever data needs to be read.

Pipeline queries can be very simple or complex, depending on your needs. Read the Query Builder docs to learn more.

Example Usage:

import { Pipeline, Source } from '@telepath/telepath';

// Source is the database to read the data from
const source = new Source('my-source', {
sourceConnectionSlug: 'my_credentials_id'
});

const pipeline = new Pipeline('my-pipeline', {
input: {
query: {
// Read data from "purchases" table in the Source
from: {
sourceId: source.id,
table: 'purchases'
}
}
}
});

Create a Pipeline Resource

new Pipeline(name: string, args: PipelineArgs, opts?: ComponentResourceOptions);
ArgumentTypeDescription
namestring (required)The unique name of the resource.
argsPipelineArgs (required)The arguments that define the resource properties.
optsComponentResourceOptionsOptions to control the resource's deployment behavior. Not typically used.