-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: delete assets api #78
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 10503587786Details
💛 - Coveralls |
| Name | Located in | Description | Required | Schema | | ||
|------------|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------| ------ | | ||
| query_expr | body | query expression based on [expr-lang](https://expr-lang.org/) to filtering the assets that wants to be deleted. `refreshed_at`, `type`, and `service` identifiers must exist in the query. The `type` and `service` must using equals (`==`) or `IN` operator | Yes | string | | ||
| dry_run | body | if set to true, then deletion should not proceed and only return the affected rows. Else, will perform deletion in the background (default) | No | string | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change the part saying:
if set to true, then deletion should not proceed and only return the affected rows
into
if set to true, deletion will not be executed but the number of rows matching the query is returned
also, need to put what is the default value to make it explicit. currently a bit confusing. an example:
(default: false) if set to true, ...
|
||
| Name | Type | Description | Required | | ||
|---------------|---------|-----------------------------------------------------|----------| | ||
| affected_rows | integer | the numbers of assets that match the given query | No | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to add column required
in this response?
### Create Reference API for Delete Assets
Idea:
DeleteAssets
as DELETE/v1/assets/
: an async API that will return how many rows that will affect based on filter criteria, and delete those rows from PostgreSQL (assets and lineage) and Elasticsearch in asynchronous.Request:
query_expr
represent query expr for filter criteria: https://github.com/expr-lang/expr.dry_run
represent whether it only return how much affected rows (if set to true), or also perform deletion process in the background (default: false).Response:
affected_rows
represent how many rows that will affect based on filter criteria.Current Approach: