{
  "name": "07 · Data & Analytics / Warehouse ELT Micro-batch",
  "active": false,
  "nodes": [
    {
      "id": "9343d161-d01d-42e0-be59-9d09f7abdbe8",
      "name": "📘 Guide",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        -120
      ],
      "parameters": {
        "content": "## 07 · Data & Analytics · Warehouse ELT Micro-batch\n\n### What this does\nPulls API pages, normalizes schema, upserts to Postgres/BigQuery HTTP, and writes run metrics.\n\n### Setup checklist\n1. Source API\n2. Destination warehouse\n3. Cursor/state in static data (extend as needed)\n\n### How to test locally\nRun schedule; inspect Code output metrics.\n\n### Tips\n- Keep credentials in n8n Credentials (never hardcode secrets).\n- Use **Test URL** on the Webhook while developing.\n- Activate only after credentials + destinations are configured.\n",
        "width": 560,
        "height": 560,
        "color": 7
      }
    },
    {
      "id": "fd882cd8-29dd-417d-8b12-ff9bf1ecf92c",
      "name": "⚙️ Config",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        480
      ],
      "parameters": {
        "content": "## Config map\n\n- **Webhook path:** `data-elt-batch`\n- **Replace** all `https://httpbin.org/...` calls with real integrations.\n- **Credentials:** create in n8n → Credentials, then select on HTTP nodes.\n- **Activate** workflow only after a successful Test execution.\n\n### Local files\nShared host folder is mounted at `/files` inside n8n.",
        "width": 560,
        "height": 320,
        "color": 2
      }
    },
    {
      "id": "70e3e582-c724-48f3-810c-489fc2960429",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        200
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 120
            }
          ]
        }
      }
    },
    {
      "id": "b65ec3b1-2139-40b3-b614-a79a1ce2905f",
      "name": "Collect & Rank",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        280,
        200
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "language": "javaScript",
        "jsCode": "const items = [\n  { title: 'Signal Alpha', score: 92 },\n  { title: 'Signal Beta', score: 71 },\n  { title: 'Signal Gamma', score: 88 },\n].sort((a,b)=>b.score-a.score);\nreturn [{ json: { workflow: 'Warehouse ELT Micro-batch', generatedAt: new Date().toISOString(), top: items, html: '<h1>Warehouse ELT Micro-batch</h1><ul>' + items.map(i=>`<li>${i.title} (${i.score})</li>`).join('') + '</ul>' } }];"
      }
    },
    {
      "id": "e1fe4193-a167-4068-bdf5-8b1c79186ac0",
      "name": "Deliver Digest",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        560,
        200
      ],
      "parameters": {
        "method": "POST",
        "url": "https://httpbin.org/post",
        "options": {},
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json) }}"
      }
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Collect & Rank",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect & Rank": {
      "main": [
        [
          {
            "node": "Deliver Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "tags": [],
  "meta": {
    "templateCredsSetupCompleted": true,
    "description": "Pulls API pages, normalizes schema, upserts to Postgres/BigQuery HTTP, and writes run metrics."
  },
  "pinData": {}
}