{
  "name": "Revenue by country and month",
  "nodes": [
    {
      "id": "c0f763e9-a9ec-4c54-8834-03778f991f9a",
      "name": "orders",
      "node_type": "source",
      "config": {
        "type": "csv_source",
        "path": "/var/tmp/battle/data/orders.csv",
        "has_header": true
      },
      "position": {
        "x": 80.0,
        "y": 80.0
      },
      "enabled": true
    },
    {
      "id": "83b62cb4-15db-480c-bebc-222638aad000",
      "name": "customers",
      "node_type": "source",
      "config": {
        "type": "csv_source",
        "path": "/var/tmp/battle/data/customers.csv",
        "has_header": true
      },
      "position": {
        "x": 80.0,
        "y": 280.0
      },
      "enabled": true
    },
    {
      "id": "1506b42f-5914-42a1-b043-49433d1701c0",
      "name": "revenue_by_country_month",
      "node_type": "transform",
      "config": {
        "type": "sql_transform",
        "query": "SELECT c.country, to_char(o.order_date, '%Y-%m') AS month, COUNT(*) AS orders, ROUND(SUM(o.amount), 2) AS revenue\nFROM orders o JOIN customers c ON o.customer_id = c.customer_id\nWHERE o.status = 'paid'\nGROUP BY c.country, to_char(o.order_date, '%Y-%m')\nORDER BY c.country, month"
      },
      "position": {
        "x": 360.0,
        "y": 180.0
      },
      "enabled": true
    },
    {
      "id": "3c86f6db-55ec-43dd-a800-fbee6ff6cbc3",
      "name": "revenue_csv",
      "node_type": "target",
      "config": {
        "type": "csv_target",
        "path": "/var/tmp/battle/out/odara_result.csv",
        "has_header": true
      },
      "position": {
        "x": 640.0,
        "y": 180.0
      },
      "enabled": true
    }
  ],
  "edges": [
    {
      "kind": "data",
      "id": "c28dd177-f0a9-43b2-800c-4f4d662df55e",
      "source": "c0f763e9-a9ec-4c54-8834-03778f991f9a",
      "target": "1506b42f-5914-42a1-b043-49433d1701c0",
      "source_port": null,
      "target_port": "orders"
    },
    {
      "kind": "data",
      "id": "c1132b76-c007-4f4c-b2b5-a4535752e607",
      "source": "83b62cb4-15db-480c-bebc-222638aad000",
      "target": "1506b42f-5914-42a1-b043-49433d1701c0",
      "source_port": null,
      "target_port": "customers"
    },
    {
      "kind": "data",
      "id": "70ccb699-b4c0-4c53-851a-32bdcb8b77ec",
      "source": "1506b42f-5914-42a1-b043-49433d1701c0",
      "target": "3c86f6db-55ec-43dd-a800-fbee6ff6cbc3",
      "source_port": null,
      "target_port": null
    }
  ]
}