Function: rmDataProductById()
rmDataProductById(
directory): (id,version?,persistFiles?) =>Promise<void>
Defined in: data-products.ts:198
Delete a data product by its id.
Optionally specify a version to delete a specific version of the data product.
Parameters​
| Parameter | Type |
|---|---|
directory | string |
Returns​
Function
Parameters​
| Parameter | Type |
|---|---|
id | string |
version? | string |
persistFiles? | boolean |
Returns​
Promise<void>
Example​
import utils from '@eventcatalog/utils';
const { rmDataProductById } = utils('/path/to/eventcatalog');
// deletes the latest CustomerDataProduct data product
await rmDataProductById('CustomerDataProduct');
// deletes a specific version of the CustomerDataProduct data product
await rmDataProductById('CustomerDataProduct', '0.0.1');