Function: getDataProduct()
getDataProduct(
directory): (id,version?) =>Promise<DataProduct>
Defined in: data-products.ts:34
Returns a data product from EventCatalog.
You can optionally specify a version to get a specific version of the data product
Parameters​
| Parameter | Type |
|---|---|
directory | string |
Returns​
Function
Parameters​
| Parameter | Type |
|---|---|
id | string |
version? | string |
Returns​
Promise<DataProduct>
Example​
import utils from '@eventcatalog/utils';
const { getDataProduct } = utils('/path/to/eventcatalog');
// Gets the latest version of the data product
const dataProduct = await getDataProduct('CustomerDataProduct');
// Gets a version of the data product
const dataProduct = await getDataProduct('CustomerDataProduct', '0.0.1');