Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"namespace": "postgres://localhost:5432",
"facets": {
"dataQualityAssertions": {
"assertions": [
"{{ unordered_list(result, 'assertions') }}": [
{
"assertion": "not_null",
"name": "not_null_customer_analytics_total_revenue",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"namespace": "postgres://localhost:5432",
"facets": {
"dataQualityAssertions": {
"assertions": [
"{{ unordered_list(result, 'assertions') }}": [
{
"assertion": "not_null",
"name": "not_null_stg_customers_customer_id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"namespace": "postgres://localhost:5432",
"facets": {
"dataQualityAssertions": {
"assertions": [
"{{ unordered_list(result, 'assertions') }}": [
{
"assertion": "not_null",
"name": "not_null_stg_orders_customer_id",
Expand Down
4 changes: 3 additions & 1 deletion scripts/compare_events.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2018-2024 contributors to the OpenLineage project
# SPDX-License-Identifier: Apache-2.0

import builtins
import json
import logging
import os
Expand Down Expand Up @@ -115,7 +116,8 @@ def diff(expected, result, prefix="", function=None) -> list:
else:
if function == "unordered_list":
for i, x in enumerate(expected):
if not any(r for r in result if diff(x, r, f"{prefix}.[{i}]") is []):
# builtins.any: this module defines its own any() as a jinja helper
if not builtins.any(diff(x, r, f"{prefix}.[{i}]") == [] for r in result):
errors.append(f"In {prefix}.[{i}], no matching elements")
else:
for i, x in enumerate(expected):
Expand Down
Loading