0.2.4 • Published 6 months ago

open-lineage-client-js v0.2.4

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Project Name

Overview

This project is supposed to offer a similar functionality as the Python and Java Open Lineage Clients so creation and transportation of the OL events.

Features

  • Event creation and serialization
  • ConsoleTransport
  • HTTPTransport
  • File Config
  • CI

Installation

To install the project dependencies, run: npm install

Usage

Event Creation

  • create a new instance of the LineageEvent (Run, Job, Dataset) using the provided Builder classes for the event itself and its Facets
const event = new RunEventBuilder(new Date().toISOString(), producer,
   schemaURL, EventType.START)
  .setRun(run)
  .setJob(job)
  .setInputs([inputDataset])
  .setOutputs([outputDataset])
  .build();

ConsoleTransport

  • create a new instance of the LineageClient it will have the console transport by default
  • pass your event to the emit method of the client
const client = new OpenLineageClient(producer, new ConsoleTransport());
client.emit(event);

HTTPTransport

  • create a new instance of the LineageClient with the HTTP transport
  • pass your event to the emit method of the client
const transport = new HttpTransport(new HttpConfig("http://localhost:5000/api/v1/lineage"));
const client = new OpenLineageClient("https://example.com", transport);
client.emit(event);

File Config

  • create a new config yaml file named 'openlineage.yaml' in root of the project
  • example of simple http transport config
transport:
  type: http
  config:
    url: http://localhost:5000/api/v1/lineage 
  • create a new instance of the LineageClient without providing the transport it will be automatically loaded from the file if file is present
    const client = new OpenLineageClient("https://example.com");
    client.emit(event);

Testing

To run the tests, use the following command: npm test

0.2.4

6 months ago

0.2.3

6 months ago

0.2.2

7 months ago

0.2.1

7 months ago

0.2.0

7 months ago

0.1.9

7 months ago

0.1.8

7 months ago

0.1.7

7 months ago

0.1.6

7 months ago

0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago