{
  "repository": "https://github.com/aluscent/SQL-Lineage-Explorer",
  "reviewedCommit": "14cb49b625c4bbea9d7fae613dd63a6ea1dd1a7a",
  "command": "python -m lineage.cli queries.json --json",
  "environment": {
    "python": "3.12.14",
    "parser": "heuristic fallback; sqlglot not installed"
  },
  "scope": "One bundled CLI example only. Not a browser test, SQL dialect conformance test, or performance benchmark.",
  "assertions": [
    "sink matches bundled example",
    "three output columns returned",
    "expected account and amount source mappings present"
  ],
  "result": {
    "sink": "retail_accounts_transactions",
    "columns": [
      {
        "name": "account_id",
        "sources": [
          "db.transactions.account_id"
        ],
        "expr": "aggregated_transactions.account_id",
        "influences": {
          "where": [
            "aggregated_transactions.account_type",
            "transactions.date_partition"
          ],
          "join": [
            "accounts.id",
            "transactions.account_id"
          ],
          "group_by": [],
          "order_by": []
        },
        "hops": [
          {
            "alias": "retail_accounts_transactions",
            "column": "account_id",
            "expr": "aggregated_transactions.account_id",
            "note": null
          },
          {
            "alias": "aggregated_transactions",
            "column": "account_id",
            "expr": "account_id",
            "note": null
          },
          {
            "alias": "transactions_of_accounts",
            "column": "account_id",
            "expr": "transactions.account_id",
            "note": null
          },
          {
            "alias": "transactions",
            "column": "account_id",
            "expr": "account_id",
            "note": null
          }
        ]
      },
      {
        "name": "account_type",
        "sources": [
          "db.accounts.account_type"
        ],
        "expr": "aggregated_transactions.account_type",
        "influences": {
          "where": [
            "aggregated_transactions.account_type",
            "transactions.date_partition"
          ],
          "join": [
            "accounts.id",
            "transactions.account_id"
          ],
          "group_by": [],
          "order_by": []
        },
        "hops": [
          {
            "alias": "retail_accounts_transactions",
            "column": "account_type",
            "expr": "aggregated_transactions.account_type",
            "note": null
          },
          {
            "alias": "aggregated_transactions",
            "column": "account_type",
            "expr": "account_type",
            "note": null
          },
          {
            "alias": "transactions_of_accounts",
            "column": "account_type",
            "expr": "accounts.account_type",
            "note": null
          },
          {
            "alias": "accounts",
            "column": "account_type",
            "expr": "account_type",
            "note": null
          }
        ]
      },
      {
        "name": "sum(amount)",
        "sources": [
          "db.transactions.amount"
        ],
        "expr": "aggregated_transactions.sum(amount)",
        "influences": {
          "where": [
            "aggregated_transactions.account_type",
            "transactions.date_partition"
          ],
          "join": [
            "accounts.id",
            "transactions.account_id"
          ],
          "group_by": [],
          "order_by": []
        },
        "hops": [
          {
            "alias": "retail_accounts_transactions",
            "column": "sum(amount)",
            "expr": "aggregated_transactions.sum(amount)",
            "note": null
          },
          {
            "alias": "aggregated_transactions",
            "column": "sum(amount)",
            "expr": "sum(amount)",
            "note": null
          },
          {
            "alias": "transactions_of_accounts",
            "column": "amount",
            "expr": "transactions.amount",
            "note": null
          },
          {
            "alias": "transactions",
            "column": "amount",
            "expr": "amount",
            "note": null
          }
        ]
      }
    ],
    "ambiguities": []
  }
}
