-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
We can use Aidbox REST Console to run SQL queries.
Reference: Postgres JSON Functions and Operators
Ex. 1: Deletion of an aidbox resource attribute
Updated resource example (the filter attribute to be deleted):
id: d6fdcc6a-4513-45df-8f06-797a4727ce7f
resourceType: MedicalRule
sourceQuery:
id: Source
type: batch
entry:
- request:
url: $snowstorm
method: POST
resource:
ecl: '<< 372586001 |Hypotensive agent (substance)|'
filter: '...' // <- to be deleted
resourceType: SnowstormRequest
Migration SQL query (for all resources of this type):
update medicalrule
set resource = jsonb_set(
resource,
'{sourceQuery,entry,0,resource}',
(resource #> '{sourceQuery,entry,0,resource}')- 'filter'
)
ir4y
Metadata
Metadata
Assignees
Labels
No labels