{"id":3192,"date":"2026-04-19T14:24:12","date_gmt":"2026-04-19T06:24:12","guid":{"rendered":"https:\/\/www.dpriver.com\/blog\/?p=3192"},"modified":"2026-04-19T15:51:55","modified_gmt":"2026-04-19T07:51:55","slug":"why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it","status":"publish","type":"post","link":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/","title":{"rendered":"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It"},"content":{"rendered":"\n<p>If you use Power BI with DataHub, some of your lineage is probably missing right now \u2014 and you don&#8217;t know it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Background: How Power BI Handles SQL<\/h2>\n\n\n\n<p>A common question from newcomers: does Power BI have its own SQL dialect? The short answer is <strong>no<\/strong>. Power BI connects to external databases \u2014 SQL Server, Snowflake, PostgreSQL, and others \u2014 and sends SQL queries written in <em>that database&#8217;s native dialect<\/em>. If your Power BI report pulls from SQL Server, the SQL inside is T-SQL; if it pulls from Snowflake, it&#8217;s Snowflake SQL.<\/p>\n\n\n\n<p>However, Power BI does have its own query language called <strong>M<\/strong> (also known as Power Query Formula Language). M wraps everything \u2014 including embedded SQL. When you write a <code>Value.NativeQuery<\/code> expression in Power BI, the SQL string lives inside an M expression, and M applies its own encoding rules.<\/p>\n\n\n\n<p>The most important encoding rule: <strong>M replaces actual newline characters with <code>#(lf)<\/code><\/strong> (M&#8217;s literal for &#8220;line feed&#8221;). So a query that a human writes as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT name\nFROM customers\n-- old filter\nWHERE active = 1<\/code><\/pre>\n\n\n\n<p>gets stored by Power BI as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select#(lf)name#(lf)from customers#(lf)-- old filter#(lf)where active = 1<\/code><\/pre>\n\n\n\n<p>This is where the trouble starts. The SQL itself is standard \u2014 the encoding around it is not.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Problem: Why Comments Break Lineage<\/h2>\n\n\n\n<p>In standard SQL, <code>--<\/code> marks a single-line comment: everything from <code>--<\/code> to the next <em>actual newline character<\/em> is ignored. But when Power BI encodes newlines as <code>#(lf)<\/code>, those aren&#8217;t real newline characters \u2014 they&#8217;re just ordinary text. So any SQL parser that receives this encoded string sees the <code>--<\/code> comment as running all the way to the end of the <em>entire query<\/em>, because there is no real newline to terminate it.<\/p>\n\n\n\n<p>This is not a parser bug in sqlglot or any other SQL parser \u2014 it&#8217;s a <strong>missing preprocessing step<\/strong>. Before parsing, someone needs to decode M&#8217;s <code>#(lf)<\/code> sequences back into real newline characters. DataHub&#8217;s Power BI ingestion connector does not do this, and neither does GSP (General SQL Parser) on its own \u2014 no SQL parser should be expected to understand Power BI M-language encoding.<\/p>\n\n\n\n<p>Here&#8217;s a real query from <a href=\"https:\/\/github.com\/datahub-project\/datahub\/issues\/11251\">DataHub issue #11251<\/a> that demonstrates the problem:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select\nupper(cs.customercode) as customercode\n, cs.ear2id as ear2id\n, db.branch_rollup_name\n, db.subregion1\n, db.subregion2\nfrom nast_truckload_domain.broker.dim_customer cs\n--join ... (commented out)\njoin nast_customer_domain.broker.dim_customer_ear2_single_ownership_history as so\n  on cs.ear2id = so.ear2_id and is_current = true\njoin nast_customer_domain.broker.ref_branch db\n  on db.Branch_code = so.branch_code\n-- join ... (commented out)\nwhere cs.customerstatusid = 1 --active\nand db.primary_business_line_id in ('62','73')<\/code><\/pre>\n\n\n\n<p>This query references two upstream tables: <code>dim_customer<\/code> and <code>ref_branch<\/code>. But when Power BI encodes it with <code>#(lf)<\/code> and DataHub&#8217;s parser reads it, the <code>--join<\/code> comment on line 8 swallows everything after it \u2014 because <code>#(lf)<\/code> doesn&#8217;t terminate the comment. DataHub sees only one table.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why It&#8217;s Worse Than It Looks<\/h2>\n\n\n\n<p>SQL comments are everywhere in Power BI datasets. Developers comment out JOINs while debugging, leave notes like <code>--active<\/code> next to filter conditions, and disable WHERE clauses during development. This is normal SQL practice \u2014 but when Power BI encodes these queries with <code>#(lf)<\/code>, every single <code>--<\/code> comment becomes a lineage-destroying landmine.<\/p>\n\n\n\n<p>Any Power BI dataset with even a single commented-out JOIN or WHERE clause will produce incomplete lineage. The lineage graph shows only a fraction of the upstream tables, and DataHub gives no warning. We verified this: sqlglot handles <code>--<\/code> comments perfectly when the newlines are real \u2014 the problem is entirely that <code>#(lf)<\/code> is not decoded before parsing.<\/p>\n\n\n\n<p>The issue has been open since August 2024. Three users have confirmed it blocks DataHub adoption in their organizations:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>&#8220;This is something very important. Especially when SQL comments are very common in PBI M-queries.&#8221; \u2014 @AntonisCSt<\/p><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>&#8220;We also run into this issue and it is a real issue for part of our business to accept Datahub as a common catalog solution.&#8221; \u2014 @rospe<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">The Fix: gsp-datahub-sidecar<\/h2>\n\n\n\n<p>The <a href=\"https:\/\/github.com\/gudusoftware\/gsp-datahub-sidecar\">gsp-datahub-sidecar<\/a> solves this with a two-step approach:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Preprocessing<\/strong>: The sidecar decodes Power BI&#8217;s M-language escape sequences (<code>#(lf)<\/code>, <code>#(cr)<\/code>, <code>#(tab)<\/code>) back into real characters before any SQL parsing happens. This is the step that DataHub&#8217;s ingestion pipeline is missing.<\/li>\n<li><strong>Parsing<\/strong>: The decoded SQL \u2014 now with real newlines \u2014 is sent to Gudu&#8217;s General SQL Parser (GSP) via SQLFlow, which correctly handles comments, JOINs, and WHERE clauses to extract complete lineage.<\/li>\n<\/ol>\n\n\n\n<p>We verified this with the exact query from the issue. First, the raw Power BI encoded form (all on one line with <code>#(lf)<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select#(lf)upper(cs.customercode) as customercode#(lf), cs.ear2id ...#(lf)from nast_truckload_domain.broker.dim_customer cs#(lf)--join ...#(lf)join ...#(lf)where cs.customerstatusid = 1 --active#(lf)and ...<\/code><\/pre>\n\n\n\n<p>Without preprocessing, <strong>every SQL parser fails<\/strong> \u2014 GSP included. The <code>--join<\/code> on the encoded &#8220;line 8&#8221; swallows everything after it. Zero lineage extracted.<\/p>\n\n\n\n<p>With the sidecar&#8217;s preprocessing, the <code>#(lf)<\/code> sequences become real newlines, and GSP correctly parses the result:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ gsp-datahub-sidecar \\\n    --sql-file powerbi_comments.sql \\\n    --db-vendor dbvmssql \\\n    --dry-run\n\nExtracted 2 table-level lineage relationships\n  NAST_TRUCKLOAD_DOMAIN.BROKER.DIM_CUSTOMER --&gt; DBO.CUSTOMER_BRANCHES (2 columns)\n  NAST_CUSTOMER_DOMAIN.BROKER.REF_BRANCH --&gt; DBO.CUSTOMER_BRANCHES (3 columns)\nColumn-level mappings extracted: 5<\/code><\/pre>\n\n\n\n<p>Both upstream tables found. All five column-level lineages recovered:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>customercode<\/code> \u2190 <code>dim_customer.customercode<\/code> (through <code>UPPER()<\/code>)<\/li>\n<li><code>ear2id<\/code> \u2190 <code>dim_customer.ear2id<\/code><\/li>\n<li><code>branch_rollup_name<\/code> \u2190 <code>ref_branch.branch_rollup_name<\/code><\/li>\n<li><code>subregion1<\/code> \u2190 <code>ref_branch.subregion1<\/code><\/li>\n<li><code>subregion2<\/code> \u2190 <code>ref_branch.subregion2<\/code><\/li>\n<\/ul>\n\n\n\n<p>Comments correctly stripped. JOINs preserved. WHERE clause intact.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Start<\/h2>\n\n\n\n<p>Three commands to recover your Power BI lineage:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># 1. Install the sidecar\npip install git+https:\/\/github.com\/gudusoftware\/gsp-datahub-sidecar.git\n\n# 2. Verify with the built-in example\ngsp-datahub-sidecar \\\n  --sql-file examples\/powerbi_comments.sql \\\n  --db-vendor dbvmssql \\\n  --dry-run\n\n# 3. Point at your DataHub instance\ngsp-datahub-sidecar \\\n  --sql-file your_query.sql \\\n  --db-vendor dbvmssql \\\n  --datahub-url http:\/\/your-datahub:8080<\/code><\/pre>\n\n\n\n<p>The sidecar emits standard DataHub MCPs (Metadata Change Proposals) via the REST API \u2014 DataHub merges the lineage with your existing metadata automatically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Your Power BI Connects to More Than One Database<\/h2>\n\n\n\n<p>The <code>#(lf)<\/code> encoding problem is Power BI specific, but the SQL inside your Power BI datasets comes from many different databases. One report might query SQL Server, another Snowflake, another Oracle. The sidecar handles all of them \u2014 GSP supports 20+ SQL dialects, so you just change the <code>--db-vendor<\/code> flag to match your backend.<\/p>\n\n\n\n<p>This matters because SQL dialects differ in syntax \u2014 T-SQL&#8217;s <code>TOP<\/code>, Snowflake&#8217;s <code>QUALIFY<\/code>, Oracle&#8217;s <code>CONNECT BY<\/code> \u2014 and a parser that only handles one dialect will silently drop lineage from the others. The sidecar gives you correct lineage regardless of which database your Power BI report connects to.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Part of a Broader Pattern<\/h2>\n\n\n\n<p>The <code>#(lf)<\/code> comment issue is one example of a broader pattern: DataHub&#8217;s parser silently drops lineage on SQL constructs it can&#8217;t fully parse. We&#8217;ve documented similar gaps with <a href=\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-your-datahub-bigquery-lineage-silently-breaks-on-procedural-sql-and-how-to-f\/\">BigQuery procedural SQL<\/a> (DECLARE, IF\/END IF, temp tables) and <a href=\"https:\/\/github.com\/datahub-project\/datahub\/issues\/11670\">dbt deduplication macros<\/a> (array_agg with struct unpacking).<\/p>\n\n\n\n<p>The sidecar fills these gaps without replacing DataHub&#8217;s parser \u2014 it augments it.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><em>Disclosure: The gsp-datahub-sidecar is built by <a href=\"https:\/\/www.gudusoft.com\">Gudu Software<\/a>, the company behind General SQL Parser and SQLFlow. The sidecar is open source under the Apache 2.0 license.<\/em><\/p>\n\n\n\n<p><em>Have a SQL parsing challenge? <a href=\"https:\/\/sqlflow.gudusoft.com\">Try SQLFlow<\/a> with your own SQL, or visit the <a href=\"https:\/\/github.com\/gudusoftware\/gsp-datahub-sidecar\">sidecar repo<\/a> to get started.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Power BI encodes newlines as #(lf) in M-language SQL. When DataHub parses queries with &#8212; comments, it silently drops all subsequent JOINs from lineage. The gsp-datahub-sidecar recovers every missing relationship.<\/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":[119,135,132,138,136,137,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 Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It<\/title>\n<meta name=\"description\" content=\"Why Power BI SQL Comments Break Your DataHub Lineage \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-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It\" \/>\n<meta property=\"og:description\" content=\"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and Data Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-19T06:24:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-19T07:51:55+00:00\" \/>\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=\"6 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-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/\",\"url\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/\",\"name\":\"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It\",\"isPartOf\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/#website\"},\"datePublished\":\"2026-04-19T06:24:12+00:00\",\"dateModified\":\"2026-04-19T07:51:55+00:00\",\"description\":\"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.dpriver.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/\"},\"author\":{\"name\":\"James\",\"@id\":\"https:\/\/www.dpriver.com\/blog\/#\/schema\/person\/7bbdbb6e79c5dd9747d08c59d5992b04\"},\"headline\":\"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It\",\"datePublished\":\"2026-04-19T06:24:12+00:00\",\"dateModified\":\"2026-04-19T07:51:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/\"},\"wordCount\":930,\"publisher\":{\"@id\":\"https:\/\/www.dpriver.com\/blog\/#organization\"},\"keywords\":[\"column-lineage\",\"data-governance\",\"datahub\",\"m-language\",\"power-bi\",\"sql-comments\",\"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 Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It","description":"Why Power BI SQL Comments Break Your DataHub Lineage \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-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/","og_locale":"en_US","og_type":"article","og_title":"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It","og_description":"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It","og_url":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/","og_site_name":"SQL and Data Blog","article_published_time":"2026-04-19T06:24:12+00:00","article_modified_time":"2026-04-19T07:51:55+00:00","author":"James","twitter_card":"summary_large_image","twitter_misc":{"Written by":"James","Est. reading time":"6 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-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/","url":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/","name":"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It","isPartOf":{"@id":"https:\/\/www.dpriver.com\/blog\/#website"},"datePublished":"2026-04-19T06:24:12+00:00","dateModified":"2026-04-19T07:51:55+00:00","description":"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It","breadcrumb":{"@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dpriver.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It"}]},{"@type":"Article","@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/#article","isPartOf":{"@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/"},"author":{"name":"James","@id":"https:\/\/www.dpriver.com\/blog\/#\/schema\/person\/7bbdbb6e79c5dd9747d08c59d5992b04"},"headline":"Why Power BI SQL Comments Break Your DataHub Lineage \u2014 and How to Fix It","datePublished":"2026-04-19T06:24:12+00:00","dateModified":"2026-04-19T07:51:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dpriver.com\/blog\/2026\/04\/why-power-bi-sql-comments-break-your-datahub-lineage-and-how-to-fix-it\/"},"wordCount":930,"publisher":{"@id":"https:\/\/www.dpriver.com\/blog\/#organization"},"keywords":["column-lineage","data-governance","datahub","m-language","power-bi","sql-comments","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\/3192"}],"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=3192"}],"version-history":[{"count":3,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/posts\/3192\/revisions"}],"predecessor-version":[{"id":3195,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/posts\/3192\/revisions\/3195"}],"wp:attachment":[{"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/media?parent=3192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/categories?post=3192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dpriver.com\/blog\/wp-json\/wp\/v2\/tags?post=3192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}