Hello everyone! I'm trying to make alerting on fai...
# troubleshoot
e
Hello everyone! I'm trying to make alerting on failed Great Expectations assetions with Actions Framework. I noticed that Kafka Event Souches only receives assertion DELETE or UPSERT events, but not assertion status changing. Is there any way to catch such event?
m
Hi @early-librarian-13786: changes to the status should come as
UPSERT
events with previous event value filled out
e
@mammoth-bear-12532 Thank you for the response Attached an example of the hello-world action config I'm using. It really tracks events when I delete assertion or run assertion fist time and I get output like this:
Copy code
Action Pipeline with name 'hello_world' is now running.
Hello world! Received event:
{
    "event_type": "MetadataChangeLogEvent_v1",
    "event": {
        "auditHeader": null,
        "entityType": "assertion",
        "entityUrn": "urn:li:assertion:083cc97b97d8ee83b4cd270a8bb7f482",
        "entityKeyAspect": null,
        "changeType": "DELETE",
        "aspectName": "assertionKey",
        "aspect": null,
        "systemMetadata": null,
        "previousAspectValue": {
            "value": "{\"assertionId\":\"083cc97b97d8ee83b4cd270a8bb7f482\"}",
            "contentType": "application/json"
        },
        "previousSystemMetadata": {
            "lastObserved": 1655797862655,
            "runId": "no-run-id-provided",
            "registryName": "unknownRegistry",
            "registryVersion": "0.0.0.0-dev",
            "properties": null
        },
        "created": {
            "time": 1656588115142,
            "actor": "urn:li:corpuser:__datahub_system",
            "impersonator": null
        }
    },
    "meta": {
        "kafka": {
            "topic": "MetadataChangeLog_Versioned_v1",
            "offset": 170856,
            "partition": 0
        }
    }
}
Hello world! Received event:
{
    "event_type": "MetadataChangeLogEvent_v1",
    "event": {
        "auditHeader": null,
        "entityType": "assertion",
        "entityUrn": "urn:li:assertion:083cc97b97d8ee83b4cd270a8bb7f482",
        "entityKeyAspect": null,
        "changeType": "UPSERT",
        "aspectName": "assertionInfo",
        "aspect": {
            "value": "{\"type\":\"DATASET\",\"datasetAssertion\":{\"nativeParameters\":{\"column_list\":\"[\\\"span_context\\\", \\\"pages_cnt\\\", \\\"sum\\\"]\"},\"nativeType\":\"expect_table_columns_to_match_ordered_list\",\"scope\":\"DATASET_SCHEMA\",\"aggregation\":\"COLUMNS\",\"parameters\":{\"value\":{\"type\":\"LIST\",\"value\":\"[\\\"span_context\\\", \\\"pages_cnt\\\", \\\"sum\\\"]\"}},\"dataset\":\"urn:li:dataset:(urn:li:dataPlatform:postgres,shelflytics.public.ge_dq_check_amazon_listing_ranking_pages,PROD)\",\"operator\":\"EQUAL_TO\"},\"customProperties\":{\"expectation_suite_name\":\"amazon_listing_ranking_pages.check\"}}",
            "contentType": "application/json"
        },
        "systemMetadata": {
            "lastObserved": 1656588139740,
            "runId": "no-run-id-provided",
            "registryName": "unknownRegistry",
            "registryVersion": "0.0.0.0-dev",
            "properties": null
        },
        "previousAspectValue": null,
        "previousSystemMetadata": null,
        "created": {
            "time": 1656588139737,
            "actor": "urn:li:corpuser:UNKNOWN",
            "impersonator": null
        }
    },
    "meta": {
        "kafka": {
            "topic": "MetadataChangeLog_Versioned_v1",
            "offset": 170857,
            "partition": 0
        }
    }
}
Hello world! Received event:
{
    "event_type": "MetadataChangeLogEvent_v1",
    "event": {
        "auditHeader": null,
        "entityType": "assertion",
        "entityUrn": "urn:li:assertion:083cc97b97d8ee83b4cd270a8bb7f482",
        "entityKeyAspect": null,
        "changeType": "UPSERT",
        "aspectName": "assertionKey",
        "aspect": {
            "value": "{\"assertionId\":\"083cc97b97d8ee83b4cd270a8bb7f482\"}",
            "contentType": "application/json"
        },
        "systemMetadata": {
            "lastObserved": 1656588139757,
            "runId": "no-run-id-provided",
            "registryName": "unknownRegistry",
            "registryVersion": "0.0.0.0-dev",
            "properties": null
        },
        "previousAspectValue": null,
        "previousSystemMetadata": null,
        "created": {
            "time": 1656588139737,
            "actor": "urn:li:corpuser:UNKNOWN",
            "impersonator": null
        }
    },
    "meta": {
        "kafka": {
            "topic": "MetadataChangeLog_Versioned_v1",
            "offset": 170858,
            "partition": 0
        }
    }
}
Hello world! Received event:
{
    "event_type": "MetadataChangeLogEvent_v1",
    "event": {
        "auditHeader": null,
        "entityType": "assertion",
        "entityUrn": "urn:li:assertion:083cc97b97d8ee83b4cd270a8bb7f482",
        "entityKeyAspect": null,
        "changeType": "UPSERT",
        "aspectName": "dataPlatformInstance",
        "aspect": {
            "value": "{\"platform\":\"urn:li:dataPlatform:great-expectations\"}",
            "contentType": "application/json"
        },
        "systemMetadata": {
            "lastObserved": 1656588139784,
            "runId": "no-run-id-provided",
            "registryName": "unknownRegistry",
            "registryVersion": "0.0.0.0-dev",
            "properties": null
        },
        "previousAspectValue": null,
        "previousSystemMetadata": null,
        "created": {
            "time": 1656588139781,
            "actor": "urn:li:corpuser:UNKNOWN",
            "impersonator": null
        }
    },
    "meta": {
        "kafka": {
            "topic": "MetadataChangeLog_Versioned_v1",
            "offset": 170859,
            "partition": 0
        }
    }
}
But when I rerun my assertions and they change status no output is shown in the console Do you have any ideas why this might be happening?