@zcatalyst/pipelines
v0.0.3
Published
JavaScript SDK for Catalyst Pipeline - Data Pipeline Orchestration
Maintainers
Readme
@zcatalyst/pipeline
JavaScript SDK for Catalyst Pipeline - Data Pipeline Orchestration
Overview
The @zcatalyst/pipelines package provides JavaScript/TypeScript methods to get Catalyst Pipeline details and trigger pipeline runs. Runs in Node.js (server-side) environments only.
Prerequisites
- A Catalyst project set up
- Pipelines created in Catalyst Console
- Understanding of pipeline components
Installation
To install this package, simply type add or install @zcatalyst/pipelines using your favorite package manager:
npm install @zcatalyst/pipelinesyarn add @zcatalyst/pipelinespnpm add @zcatalyst/pipelines
Getting Started
Import
The Catalyst SDK is modularized by Components.
To send a request, you only need to import the Pipelines:
// ES5 example
const { Pipelines } = require('@zcatalyst/pipelines');// ES6+ example
import { Pipelines } from '@zcatalyst/pipelines';Usage
To send a request, you:
- Create a Pipelines Instance.
- Call the Pipelines operation with input parameters.
const pipelines = new Pipelines();
const data = await pipelines.getPipelineDetails("16965000000019146");Async/await
We recommend using await operator to wait for the promise returned by send operation as follows:
try {
const data = await pipelines.getPipelineDetails("16965000000019146");
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}Error Handling
try {
const data = await pipelines.getPipelineDetails("16965000000019146");
// process data.
} catch (error) {
const message = error.message;
const status = error.statusCode;
console.log({ message, status });
}Resources
Contributing
See CONTRIBUTING for more information on how to get started.
License
This SDK is distributed under the Apache License 2.0. See LICENSE file for more information.
