Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/policies/bootstrap_entity_policies.json
Original file line number Diff line number Diff line change
Expand Up @@ -3758,7 +3758,7 @@
],
"policyResourceCategory": "ENTITY",
"policyResources": [
"entity-type:alpha_DQRuleTemplate",
"entity-type:DataQualityTemplate",
"entity-classification:*",
"entity:*"
],
Expand Down
24 changes: 12 additions & 12 deletions addons/static/templates/policy_cache_transformer_persona.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"policyConditionType": "excludeEntityTypes",
"policyConditionValues": [
"alpha_DQRule"
"DataQualityRule"
]
}
]
Expand All @@ -35,7 +35,7 @@
{
"policyConditionType": "excludeEntityTypes",
"policyConditionValues": [
"alpha_DQRule"
"DataQualityRule"
]
}
]
Expand Down Expand Up @@ -64,7 +64,7 @@
{
"policyConditionType": "excludeEntityTypes",
"policyConditionValues": [
"alpha_DQRule"
"DataQualityRule"
]
}
]
Expand Down Expand Up @@ -93,7 +93,7 @@
{
"policyConditionType": "excludeEntityTypes",
"policyConditionValues": [
"alpha_DQRule"
"DataQualityRule"
]
}
]
Expand All @@ -114,7 +114,7 @@
{
"policyConditionType": "excludeEntityTypes",
"policyConditionValues": [
"alpha_DQRule"
"DataQualityRule"
]
}
]
Expand All @@ -135,7 +135,7 @@
{
"policyConditionType": "excludeEntityTypes",
"policyConditionValues": [
"alpha_DQRule"
"DataQualityRule"
]
}
]
Expand Down Expand Up @@ -1317,7 +1317,7 @@
"policyResourceCategory": "ENTITY",
"resources": [
"entity:{entity}/*/rule/*",
"entity-type:alpha_DQRule",
"entity-type:DataQualityRule",
"entity-classification:*"
],
"actions": ["entity-read"]
Expand All @@ -1329,7 +1329,7 @@
"policyType": "ACCESS",
"resources": [
"entity:{entity}/*/rule/*",
"entity-type:alpha_DQRule",
"entity-type:DataQualityRule",
"entity-classification:*"
],
"actions": ["entity-create"]
Expand All @@ -1342,7 +1342,7 @@
"relationship-type:*",

"end-one-entity:{entity}/*/rule/*",
"end-one-entity-type:alpha_DQRule",
"end-one-entity-type:DataQualityRule",
"end-one-entity-classification:*",

"end-two-entity:*",
Expand All @@ -1359,7 +1359,7 @@
"policyResourceCategory": "ENTITY",
"resources": [
"entity:{entity}/*/rule/*",
"entity-type:alpha_DQRule",
"entity-type:DataQualityRule",
"entity-classification:*"
],
"actions": ["entity-update"]
Expand All @@ -1371,7 +1371,7 @@
"relationship-type:*",

"end-one-entity:{entity}/*/rule/*",
"end-one-entity-type:alpha_DQRule",
"end-one-entity-type:DataQualityRule",
"end-one-entity-classification:*",

"end-two-entity:*",
Expand All @@ -1387,7 +1387,7 @@
"policyType": "ACCESS",
"resources": [
"entity:{entity}/*/rule/*",
"entity-type:alpha_DQRule",
"entity-type:DataQualityRule",
"entity-classification:*"
],
"actions": ["entity-delete"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ public static JsonNode createQueryWithOperatorForTag(String operator, String att
return createDSLForTagKeyValue(attributeName, attributeValueNode);
}
}
case POLICY_FILTER_CRITERIA_NOT_EQUALS -> {
case POLICY_FILTER_CRITERIA_NOT_EQUALS, POLICY_FILTER_CRITERIA_NOT_IN -> {
ObjectNode mustNotNode = queryNode.putObject("bool").putObject("must_not");
if (attributeValueNode.isArray()) {
ArrayNode shouldArray = mustNotNode.putArray("should");
ArrayNode shouldArray = mustNotNode.putObject("bool").putArray("should");
for (JsonNode valueNode : attributeValueNode) {
shouldArray.add(createDSLForTagKeyValue(attributeName, valueNode));
}
Expand All @@ -197,17 +197,6 @@ public static JsonNode createQueryWithOperatorForTag(String operator, String att
shouldArray.add(createDSLForTagKeyValue(attributeName, attributeValueNode));
}
}
case POLICY_FILTER_CRITERIA_NOT_IN -> {
ObjectNode notInMustNot = queryNode.putObject("bool").putObject("must_not");
ArrayNode notInShouldArray = notInMustNot.putArray("should");
if (attributeValueNode.isArray()) {
for (JsonNode valueNode : attributeValueNode) {
notInShouldArray.add(createDSLForTagKeyValue(attributeName, valueNode));
}
} else {
notInShouldArray.add(createDSLForTagKeyValue(attributeName, attributeValueNode));
}
}
default -> LOG.warn("Found unknown operator {}", operator);
}
return queryNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2898,7 +2898,7 @@ public void testDebugValidationIssues() throws Exception {
"bool": {
"must": [
{"term": {"__state": "ACTIVE"}},
{"term": {"__typeName.keyword": "alpha_DQRuleTemplate"}}
{"term": {"__typeName.keyword": "DataQualityTemplate"}}
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"should": [
{
"term": {
"__typeName.keyword": "alpha_DQRuleTemplate"
"__typeName.keyword": "DataQualityTemplate"
}
}
]
Expand All @@ -38,7 +38,7 @@
"aggs": {
"group_by_dimension": {
"terms": {
"field": "alpha_dqRuleTemplateDimension",
"field": "dqRuleTemplateDimension",
"size": 10
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"SnowflakeTag",
"DbtTag",
"BigqueryTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"SnowflakeTag",
"DbtTag",
"BigqueryTag"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
"BIProcess",
"MatillionComponent",
"ModelVersion",
"alpha_DQRule",
"DataQualityRule",
"FlowDatasetOperation",
"FlowFieldOperation",
"SnowflakeTag",
Expand Down
Loading