{
  "db_name": "PostgreSQL",
  "query": "SELECT COALESCE(\n                    (SELECT DISTINCT ON (s.path) s.schema FROM script s WHERE s.path = jb.runnable_path AND jb.kind = 'script' ORDER BY s.path, s.created_at DESC),\n                    (SELECT flow_version.schema FROM flow LEFT JOIN flow_version ON flow_version.id = flow.versions[array_upper(flow.versions, 1)] WHERE flow.path = jb.runnable_path AND jb.kind = 'flow')\n                ) FROM v2_job jb\n                WHERE jb.id = $1 AND jb.workspace_id = $2\n                GROUP BY jb.kind, jb.runnable_path",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "coalesce",
        "type_info": "Json"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Text"
      ]
    },
    "nullable": [
      null
    ]
  },
  "hash": "a1ab1f23f49496f745d89d6c33a91c6b693afc4477a634aa84f81db91f9e03a4"
}
