open-lineage-client
Version:
TypeScript/JavaScript client for creating and sending OpenLineage standard events.
35 lines • 918 B
JavaScript
import { InputDataset } from '../entities/InputDataset.js';
/**
* Builder for creating InputDataset instances.
*/
export class InputDatasetBuilder {
constructor() {
this.name = null;
this.namespace = null;
this.facets = {};
this.inputFacets = {};
}
setName(name) {
this.name = name;
return this;
}
setNamespace(namespace) {
this.namespace = namespace;
return this;
}
setFacets(facets) {
this.facets = facets;
return this;
}
setInputFacets(inputFacets) {
this.inputFacets = inputFacets;
return this;
}
build() {
if (!this.name || !this.namespace) {
throw new Error('Name and Namespace are required');
}
return new InputDataset(this.name, this.namespace, this.facets, this.inputFacets);
}
}
//# sourceMappingURL=InputDatasetBuilder.js.map