{"id":3187,"date":"2026-04-18T11:42:05","date_gmt":"2026-04-18T03:42:05","guid":{"rendered":"https:\/\/www.dpriver.com\/blog\/?p=3187"},"modified":"2026-04-18T11:51:26","modified_gmt":"2026-04-18T03:51:26","slug":"why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f","status":"publish","type":"post","link":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/","title":{"rendered":"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It"},"content":{"rendered":"<p>If you use DataHub to track data lineage from BigQuery, you may have noticed something unsettling: some of your most important queries produce <strong>no lineage at all<\/strong>. No upstream tables, no column mappings \u2014 just a silent gap in your lineage graph.<\/p>\n<p>This isn&#8217;t a DataHub bug. It&#8217;s a parser limitation that affects a specific but increasingly common class of SQL: <strong>GoogleSQL procedural blocks<\/strong>.<\/p>\n<p>This post explains exactly what breaks, why it happens, and how to recover the missing lineage using an open-source sidecar tool \u2014 without modifying your DataHub installation.<\/p>\n<h2 class=\"wp-block-heading\">What breaks: procedural SQL in BigQuery<\/h2>\n<p>BigQuery&#8217;s GoogleSQL supports procedural constructs: <code>DECLARE<\/code>, <code>IF\/THEN\/END IF<\/code>, <code>CALL<\/code>, <code>BEGIN...EXCEPTION...END<\/code>, and <code>CREATE TEMP TABLE<\/code> inside scripting blocks. These are widely used in production BigQuery workloads for ETL orchestration, conditional logic, and error handling.<\/p>\n<p>Here&#8217;s a simplified example (derived from <a href=\"https:\/\/github.com\/datahub-project\/datahub\/issues\/11654\">datahub-project\/datahub#11654<\/a>):<\/p>\n<pre class=\"wp-block-code\"><code>DECLARE current_job_start TIMESTAMP DEFAULT CURRENT_TIMESTAMP;\nDECLARE partitions STRUCT&lt;max_record_ts TIMESTAMP, dates ARRAY&lt;DATE&gt;&gt;;\n\nCALL `internal_project.get_partitions`(\n  ('project.dataset.view_name', 'EventTimestamp'),\n  partitions\n);\n\nIF ARRAY_LENGTH(partitions.dates) &gt; 0 THEN\n  CREATE OR REPLACE TEMP TABLE temp_table AS\n  SELECT * EXCEPT (SnapshotTimestamp)\n  FROM `project.dataset.view_name`\n  WHERE (IDField, FlagField, ForeignKeyField, StartDate)\n        IN UNNEST(partitions.dates)\n  ORDER BY EventTimestamp;\n\n  IF (SELECT COUNT(1) FROM temp_table_delta) &gt; 0 THEN\n    CREATE OR REPLACE TEMP TABLE final_output AS\n    SELECT DISTINCT IDField, Email, UserID,\n           EventTimestamp, BusinessDate\n    FROM temp_table_delta\n    WHERE EventTimestamp BETWEEN '2023-01-01' AND '2023-12-31';\n  END IF;\nEND IF;<\/code><\/pre>\n<p>This SQL contains two clear lineage relationships:<\/p>\n<ul class=\"wp-block-list\">\n<li><code>project.dataset.view_name<\/code> \u2192 <code>temp_table<\/code> (6 columns)<\/li>\n<li><code>temp_table_delta<\/code> \u2192 <code>final_output<\/code> (5 columns)<\/li>\n<\/ul>\n<p>But when DataHub ingests this query, <strong>both relationships are lost<\/strong>.<\/p>\n<h2 class=\"wp-block-heading\">Why it happens<\/h2>\n<p>DataHub&#8217;s BigQuery ingestion uses sqlglot for SQL parsing and lineage extraction. sqlglot handles standard SQL well \u2014 <code>SELECT<\/code>, <code>INSERT<\/code>, <code>CREATE VIEW<\/code>, joins, CTEs, window functions \u2014 but its BigQuery dialect does not support procedural language constructs.<\/p>\n<p>When sqlglot encounters <code>DECLARE<\/code>, <code>IF\/THEN<\/code>, or <code>CALL<\/code>, it falls back to an opaque <code>Command<\/code> node. The SQL inside the procedural block is not parsed, and no lineage is extracted. This isn&#8217;t a bug in sqlglot \u2014 procedural SQL is genuinely hard to parse, and full procedural language support is outside sqlglot&#8217;s current scope.<\/p>\n<p>The result: DataHub silently drops lineage for any BigQuery query that uses procedural syntax. No error message, no warning in the UI \u2014 the lineage simply doesn&#8217;t appear.<\/p>\n<p>This issue was first reported in October 2024 (<a href=\"https:\/\/github.com\/datahub-project\/datahub\/issues\/11654\">datahub-project\/datahub#11654<\/a>) and remains open.<\/p>\n<h2 class=\"wp-block-heading\">The fix: a post-processor sidecar<\/h2>\n<p>We built <a href=\"https:\/\/github.com\/gudusoftware\/gsp-datahub-sidecar\">gsp-datahub-sidecar<\/a>, an open-source (Apache 2.0) tool that recovers the missing lineage. It works as a post-processor alongside your existing DataHub ingestion \u2014 no changes to your DataHub installation required.<\/p>\n<p>The sidecar re-parses the SQL that sqlglot couldn&#8217;t handle using <a href=\"https:\/\/sqlflow.gudusoft.com\">Gudu SQLFlow<\/a>, which supports procedural SQL natively across 20+ dialects, including BigQuery&#8217;s GoogleSQL. It then emits the recovered lineage to DataHub via the standard REST API.<\/p>\n<pre class=\"wp-block-code\"><code>DataHub ingestion (unchanged)       gsp-datahub-sidecar\n  BQ audit log \u2192 sqlglot \u2192 lineage     |\n                    |                   | re-parse procedural SQL\n                    v                   | with Gudu SQLFlow\n              \"Command fallback\"        v\n              (lineage lost)      DataHub GMS (lineage restored)<\/code><\/pre>\n<p>The sidecar does <strong>not<\/strong> replace or interfere with sqlglot-generated lineage. It adds to it \u2014 filling the gaps that procedural SQL creates.<\/p>\n<h2 class=\"wp-block-heading\">How to use it<\/h2>\n<h3 class=\"wp-block-heading\">Step 1: Install<\/h3>\n<pre class=\"wp-block-code\"><code>pip install git+https:\/\/github.com\/gudusoftware\/gsp-datahub-sidecar.git<\/code><\/pre>\n<h3 class=\"wp-block-heading\">Step 2: Dry-run (no DataHub needed)<\/h3>\n<p>Preview the lineage that would be recovered:<\/p>\n<pre class=\"wp-block-code\"><code>gsp-datahub-sidecar \\\n  --sql-file examples\/bigquery_procedural.sql \\\n  --dry-run<\/code><\/pre>\n<p>Output:<\/p>\n<pre class=\"wp-block-code\"><code>Processing 1 SQL statement(s) in 'anonymous' mode...\n  Lineage: PROJECT.DATASET.VIEW_NAME --&gt; TEMP_TABLE (12 columns)\n  Lineage: TEMP_TABLE_DELTA --&gt; FINAL_OUTPUT (5 columns)\n[DRY RUN] Would emit 2 MCPs to http:\/\/localhost:8080<\/code><\/pre>\n<p>The two lineage relationships that DataHub was missing are recovered, along with 11 column-level mappings.<\/p>\n<h3 class=\"wp-block-heading\">Step 3: Emit to DataHub<\/h3>\n<p>Point the sidecar at your DataHub GMS:<\/p>\n<pre class=\"wp-block-code\"><code>gsp-datahub-sidecar \\\n  --sql-file examples\/bigquery_procedural.sql \\\n  --datahub-server http:\/\/localhost:8080<\/code><\/pre>\n<h3 class=\"wp-block-heading\">Step 4: Verify in DataHub<\/h3>\n<p>Open the DataHub UI and search for <code>temp_table<\/code>. The lineage tab now shows the upstream relationship from <code>project.dataset.view_name<\/code>, with column-level lineage arrows:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/gudusoftware\/gsp-datahub-sidecar\/main\/images\/temp_table.png\" alt=\"temp_table lineage in DataHub \u2014 table-level and column-level arrows recovered\" \/><\/figure>\n<p>And for <code>final_output<\/code>, the lineage from <code>temp_table_delta<\/code> with all 5 column mappings:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/gudusoftware\/gsp-datahub-sidecar\/main\/images\/final_output.png\" alt=\"final_output lineage in DataHub \u2014 5 column-level lineage arrows from temp_table_delta\" \/><\/figure>\n<p>Both table-level and column-level lineage are fully visible in DataHub&#8217;s lineage graph \u2014 recovered from procedural SQL that was previously invisible.<\/p>\n<h2 class=\"wp-block-heading\">Three backend modes<\/h2>\n<p>The sidecar supports three backends, depending on your security and volume requirements:<\/p>\n<figure class=\"wp-block-table\">\n<table style=\"border-collapse:collapse;width:100%\">\n<thead>\n<tr style=\"background:#f0f4f8\">\n<th style=\"padding:8px 12px;border:1px solid #ddd;text-align:left\">Mode<\/th>\n<th style=\"padding:8px 12px;border:1px solid #ddd;text-align:left\">Auth<\/th>\n<th style=\"padding:8px 12px;border:1px solid #ddd;text-align:left\">Limit<\/th>\n<th style=\"padding:8px 12px;border:1px solid #ddd;text-align:left\">Data location<\/th>\n<th style=\"padding:8px 12px;border:1px solid #ddd;text-align:left\">Use case<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:8px 12px;border:1px solid #ddd\"><code>anonymous<\/code> (default)<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">None<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">50\/day<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">SQL sent to api.gudusoft.com<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">Quick evaluation<\/td>\n<\/tr>\n<tr style=\"background:#f9fafb\">\n<td style=\"padding:8px 12px;border:1px solid #ddd\"><code>authenticated<\/code><\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">userId + secretKey<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">10k\/month<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">SQL sent to api.gudusoft.com<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">Extended evaluation<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:8px 12px;border:1px solid #ddd\"><code>self_hosted<\/code><\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">userId + secretKey<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">Unlimited<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">SQL stays in your VPC<\/td>\n<td style=\"padding:8px 12px;border:1px solid #ddd\">Production<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>For production use with sensitive SQL, the <a href=\"https:\/\/docs.gudusoft.com\/docker\/\">self-hosted SQLFlow Docker<\/a> keeps all data in your infrastructure \u2014 no SQL leaves your network.<\/p>\n<h2 class=\"wp-block-heading\">What&#8217;s next<\/h2>\n<p>If you&#8217;re affected by <a href=\"https:\/\/github.com\/datahub-project\/datahub\/issues\/11654\">datahub-project\/datahub#11654<\/a> or similar lineage gaps in your DataHub instance:<\/p>\n<ol class=\"wp-block-list\">\n<li><strong>Try the dry-run<\/strong> with your own SQL files to see what lineage you&#8217;re currently missing<\/li>\n<li><strong>Check the <a href=\"https:\/\/github.com\/gudusoftware\/gsp-datahub-sidecar\">GitHub repo<\/a><\/strong> for full documentation, configuration options, and additional examples (including Oracle stored procedures)<\/li>\n<li><strong>Sign up for the authenticated tier<\/strong> at <a href=\"https:\/\/docs.gudusoft.com\/sign-up\/\">docs.gudusoft.com\/sign-up<\/a> for higher volume evaluation<\/li>\n<\/ol>\n<p>The sidecar is Apache 2.0 licensed. Gudu SQLFlow is a commercial product with a free evaluation tier. For questions or feedback, open an issue on GitHub or reach out at support@gudusoft.com.<\/p>\n<p><em>Disclosure: This tool is built by <a href=\"https:\/\/gudusoft.com\">Gudu Software<\/a>, the team behind General SQL Parser and SQLFlow. We specialize in deep SQL parsing and data lineage across 20+ SQL dialects.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DataHub&#8217;s BigQuery ingestion silently loses lineage on procedural SQL (DECLARE, IF\/THEN, CALL). This post explains why, and shows how to recover the missing lineage using an open-source sidecar tool.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[14,25,93],"tags":[117,119,135,132,134,133,127],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":5}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It<\/title>\n<meta name=\"description\" content=\"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It\" \/>\n<meta property=\"og:description\" content=\"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and Data Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-18T03:42:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-18T03:51:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/raw.githubusercontent.com\/gudusoftware\/gsp-datahub-sidecar\/main\/images\/temp_table.png\" \/>\n<meta name=\"author\" content=\"James\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/#organization\",\"name\":\"SQL and Data Blog\",\"url\":\"https:\/\/www.dpriver.com\/blog\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.dpriver.com\/blog\/wp-content\/uploads\/2022\/07\/sqlpp-character.png\",\"contentUrl\":\"https:\/\/www.dpriver.com\/blog\/wp-content\/uploads\/2022\/07\/sqlpp-character.png\",\"width\":251,\"height\":72,\"caption\":\"SQL and Data Blog\"},\"image\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/#website\",\"url\":\"https:\/\/www.dpriver.com\/blog\/\",\"name\":\"SQL and Data Blog\",\"description\":\"SQL related blog for database professional\",\"publisher\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dpriver.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/\",\"url\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/\",\"name\":\"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It\",\"isPartOf\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/#website\"},\"datePublished\":\"2026-04-18T03:42:05+00:00\",\"dateModified\":\"2026-04-18T03:51:26+00:00\",\"description\":\"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.dpriver.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/\"},\"author\":{\"name\":\"James\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/#\/schema\/person\/7bbdbb6e79c5dd9747d08c59d5992b04\"},\"headline\":\"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It\",\"datePublished\":\"2026-04-18T03:42:05+00:00\",\"dateModified\":\"2026-04-18T03:51:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/\"},\"wordCount\":680,\"publisher\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/#organization\"},\"keywords\":[\"bigquery\",\"column-lineage\",\"data-governance\",\"datahub\",\"procedural-sql\",\"sql-lineage\",\"sqlglot\"],\"articleSection\":[\"gsp\",\"sql\",\"SQLFlow\"],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/#\/schema\/person\/7bbdbb6e79c5dd9747d08c59d5992b04\",\"name\":\"James\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eeddf4ca7bdafa37ab025068efdc7302?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eeddf4ca7bdafa37ab025068efdc7302?s=96&d=mm&r=g\",\"caption\":\"James\"},\"sameAs\":[\"http:\/\/www.dpriver.com\"],\"url\":\"https:\/\/www.dpriver.com\/blog\/author\/james\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It","description":"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/","og_locale":"en_US","og_type":"article","og_title":"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It","og_description":"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It","og_url":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/","og_site_name":"SQL and Data Blog","article_published_time":"2026-04-18T03:42:05+00:00","article_modified_time":"2026-04-18T03:51:26+00:00","og_image":[{"url":"https:\/\/raw.githubusercontent.com\/gudusoftware\/gsp-datahub-sidecar\/main\/images\/temp_table.png"}],"author":"James","twitter_card":"summary_large_image","twitter_misc":{"Written by":"James","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.dpriver.com\/blog\/#organization","name":"SQL and Data Blog","url":"https:\/\/www.dpriver.com\/blog\/","sameAs":[],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dpriver.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dpriver.com\/blog\/wp-content\/uploads\/2022\/07\/sqlpp-character.png","contentUrl":"https:\/\/www.dpriver.com\/blog\/wp-content\/uploads\/2022\/07\/sqlpp-character.png","width":251,"height":72,"caption":"SQL and Data Blog"},"image":{"@id":"https:\/\/www.dpriver.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/www.dpriver.com\/blog\/#website","url":"https:\/\/www.dpriver.com\/blog\/","name":"SQL and Data Blog","description":"SQL related blog for database professional","publisher":{"@id":"https:\/\/www.dpriver.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dpriver.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/","url":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/","name":"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It","isPartOf":{"@id":"https:\/\/www.dpriver.com\/blog\/#website"},"datePublished":"2026-04-18T03:42:05+00:00","dateModified":"2026-04-18T03:51:26+00:00","description":"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It","breadcrumb":{"@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dpriver.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It"}]},{"@type":"Article","@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/#article","isPartOf":{"@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/"},"author":{"name":"James","@id":"https:\/\/www.dpriver.com\/blog\/#\/schema\/person\/7bbdbb6e79c5dd9747d08c59d5992b04"},"headline":"Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL \u2014 and How to Fix It","datePublished":"2026-04-18T03:42:05+00:00","dateModified":"2026-04-18T03:51:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/"},"wordCount":680,"publisher":{"@id":"https:\/\/www.dpriver.com\/blog\/#organization"},"keywords":["bigquery","column-lineage","data-governance","datahub","procedural-sql","sql-lineage","sqlglot"],"articleSection":["gsp","sql","SQLFlow"],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dpriver.com\/blog\/#\/schema\/person\/7bbdbb6e79c5dd9747d08c59d5992b04","name":"James","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dpriver.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eeddf4ca7bdafa37ab025068efdc7302?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eeddf4ca7bdafa37ab025068efdc7302?s=96&d=mm&r=g","caption":"James"},"sameAs":["http:\/\/www.dpriver.com"],"url":"https:\/\/www.dpriver.com\/blog\/author\/james\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/posts\/3187"}],"collection":[{"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/comments?post=3187"}],"version-history":[{"count":3,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/posts\/3187\/revisions"}],"predecessor-version":[{"id":3190,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/posts\/3187\/revisions\/3190"}],"wp:attachment":[{"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/media?parent=3187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/categories?post=3187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/tags?post=3187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}