Skip to main content

Source

TL;DR - Sources tell Telepath what database to connect to.

A Source is a type of Resource that represents a database that contains the data you'd like to use to train your model. This is generally a cloud-hosted database or data warehouse that contains your application or analytics data.

Every Source must specify which Source Connection should be used to authenticate the connection to the database.

Source Connections

A Source Connection is an object that defines the database connection configuration, including the encrypted credentials. The values of a Source Connection vary by database type, but they include things like host, database name, username, and password.

You can create and manage Source Connections in the Telepath UI.

At this time, Source Connections can only be defined using the Telepath UI. We will add support for creating secrets using code and the CLI in the future.

Example Usage

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

const mySource = new Source('my-source-name', {
/*
The slug of the Source Connection defined in the Telepath UI.
Read more about Source Connections in the docs below.
*/
sourceConnectionSlug: "my-connection"
});

Create a Source Resource

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