Skip to content

Commit fdb72b0

Browse files
author
psubram3
committed
add model_derivation_group to Hasura metadata
1 parent ea35853 commit fdb72b0

3 files changed

Lines changed: 61 additions & 0 deletions

File tree

deployment/hasura/metadata/databases/tables/merlin/mission_model.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ array_relationships:
3939
table:
4040
name: plan
4141
schema: merlin
42+
- name: derivation_group_specification
43+
using:
44+
foreign_key_constraint_on:
45+
column: model_id
46+
table:
47+
name: model_derivation_group
48+
schema: merlin
4249
- name: resource_types
4350
using:
4451
foreign_key_constraint_on:
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
table:
2+
name: model_derivation_group
3+
schema: merlin
4+
configuration:
5+
custom_name: "model_derivation_group"
6+
object_relationships:
7+
- name: mission_model
8+
using:
9+
foreign_key_constraint_on: model_id
10+
- name: derivation_group
11+
using:
12+
foreign_key_constraint_on: derivation_group_name
13+
array_relationships:
14+
- name: external_events
15+
using:
16+
manual_configuration:
17+
remote_table:
18+
name: external_event
19+
schema: merlin
20+
column_mapping:
21+
derivation_group_name: derivation_group_name
22+
select_permissions:
23+
- role: aerie_admin
24+
permission:
25+
columns: '*'
26+
filter: {}
27+
allow_aggregations: true
28+
- role: user
29+
permission:
30+
columns: '*'
31+
filter: {}
32+
allow_aggregations: true
33+
- role: viewer
34+
permission:
35+
columns: '*'
36+
filter: {}
37+
allow_aggregations: true
38+
insert_permissions:
39+
- role: aerie_admin
40+
permission:
41+
columns: [model_id, derivation_group_name]
42+
check: {}
43+
- role: user
44+
permission:
45+
columns: [model_id, derivation_group_name]
46+
check: {"mission_model": {"owner": {"_eq": "X-Hasura-User-Id"}}}
47+
delete_permissions:
48+
- role: aerie_admin
49+
permission:
50+
filter: {}
51+
- role: user
52+
permission:
53+
filter: {"mission_model": {"owner": {"_eq": "X-Hasura-User-Id"}}}

deployment/hasura/metadata/databases/tables/tables.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
- "!include merlin/external_source.yaml"
114114
- "!include merlin/external_source_type.yaml"
115115
- "!include merlin/plan_derivation_group.yaml"
116+
- "!include merlin/model_derivation_group.yaml"
116117

117118
# Constraints
118119
- "!include merlin/constraints/constraint_metadata.yaml"

0 commit comments

Comments
 (0)