Hi all! I have a quick question regarding emittin...
# troubleshoot
b
Hi all! I have a quick question regarding emitting validation results. I currently have a loop set up to push assertionInfo, assertionPlatform, and assertionResults to DataHub via a Python Kafka emitter. Everything is working properly, but of the three test assertions I've written, only the latest is showing up in the Validator tab. I'm having trouble finding an example of multiple assertions being pushed to DataHub -- do you have any pointers?
oh wait -- correct me if I'm wrong -- I think I'm setting the status to COMPLETE too early... -> that wasn't it
I think I figured out the issue -- the assertionUrn needs to change for each assertion (seems obvious now), but for some reason builder.make_assertion_urn from assertion info is not creating a unique urn for subsequent runs. -- still figuring out why
^I was passing in an empty json string into the make_assertion_urn method in my latest tests... Marking this one as solved
vars(info.datasetAssertion) was returning an empty dictionary, so this was my solution:
Copy code
def assertionUrn(info: AssertionInfo) -> str:
    urn = builder.make_assertion_urn(
        builder.datahub_guid(
            {
                "dataset": info.datasetAssertion.dataset,
                "scope": info.datasetAssertion.scope,
                "fields": info.datasetAssertion.fields,
                "aggregation": info.datasetAssertion.aggregation,
                "operator": info.datasetAssertion.operator,
            }
        )
    )
    print(urn)
    return urn
l
Thanks for following up with your fix, @busy-airport-23391!! teamwork