<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to stop Databricks adding quotes to multi-line selections in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-stop-databricks-adding-quotes-to-multi-line-selections/m-p/150572#M53473</link>
    <description>&lt;P&gt;I'm using a query to generate some YML code from my tables, and running into an annoying behaviour. Here's a simplified example...&lt;/P&gt;&lt;P&gt;Run this query in a notebook or the SQL editor:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT 'foo\nbar'
FROM system.information_schema.tables
LIMIT 10&lt;/LI-CODE&gt;&lt;P&gt;You get a result that looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="foobar.png" style="width: 327px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/24715iD29C4981B4AE134E/image-size/large?v=v2&amp;amp;px=999" role="button" title="foobar.png" alt="foobar.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Ten rows, each with foo (new line) bar, as expected from my query. Now select those results, copy them and paste them somewhere, you get this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"&lt;/LI-CODE&gt;&lt;P&gt;Databricks has "helpfully" added a set of double quotes to each line. I don't want these. If I had wanted them I would have put them in my original query. Is there any way to switch this behaviour off?&lt;/P&gt;</description>
    <pubDate>Wed, 11 Mar 2026 10:39:26 GMT</pubDate>
    <dc:creator>ChrisHunt</dc:creator>
    <dc:date>2026-03-11T10:39:26Z</dc:date>
    <item>
      <title>How to stop Databricks adding quotes to multi-line selections</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-stop-databricks-adding-quotes-to-multi-line-selections/m-p/150572#M53473</link>
      <description>&lt;P&gt;I'm using a query to generate some YML code from my tables, and running into an annoying behaviour. Here's a simplified example...&lt;/P&gt;&lt;P&gt;Run this query in a notebook or the SQL editor:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT 'foo\nbar'
FROM system.information_schema.tables
LIMIT 10&lt;/LI-CODE&gt;&lt;P&gt;You get a result that looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="foobar.png" style="width: 327px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/24715iD29C4981B4AE134E/image-size/large?v=v2&amp;amp;px=999" role="button" title="foobar.png" alt="foobar.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Ten rows, each with foo (new line) bar, as expected from my query. Now select those results, copy them and paste them somewhere, you get this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"
"foo
bar"&lt;/LI-CODE&gt;&lt;P&gt;Databricks has "helpfully" added a set of double quotes to each line. I don't want these. If I had wanted them I would have put them in my original query. Is there any way to switch this behaviour off?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 10:39:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-stop-databricks-adding-quotes-to-multi-line-selections/m-p/150572#M53473</guid>
      <dc:creator>ChrisHunt</dc:creator>
      <dc:date>2026-03-11T10:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop Databricks adding quotes to multi-line selections</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-stop-databricks-adding-quotes-to-multi-line-selections/m-p/150581#M53477</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/198751"&gt;@ChrisHunt&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When a cell value contains a newline, the copy operation wraps it in double quotes (CSV/RFC 4180 style). There's&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;no setting to disable this&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;— it's hardcoded in the UI's copy behavior. This happen only if you have a newline.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 11:16:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-stop-databricks-adding-quotes-to-multi-line-selections/m-p/150581#M53477</guid>
      <dc:creator>Ale_Armillotta</dc:creator>
      <dc:date>2026-03-11T11:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop Databricks adding quotes to multi-line selections</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-stop-databricks-adding-quotes-to-multi-line-selections/m-p/150601#M53480</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/198751"&gt;@ChrisHunt&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;As Ale_Armillotta mentioned,&amp;nbsp;any field that contains a newline is wrapped in double quotes so that each row still represents a single CSV record. I think that is a logical and expected behaviour. There is currently no setting to turn this quoting off.&lt;/P&gt;
&lt;P&gt;Your best option is to download as csv and get rid of the double quotes with a script or editor if you really need multi-line fields without surrounding quotes. However, that would mean the line breaks will go away and you'll see them as separate columns when you open the file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Before:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="line_break_before.jpg" style="width: 195px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/24720i746384DE03972C7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="line_break_before.jpg" alt="line_break_before.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;After:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="line_break_after.jpg" style="width: 278px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/24721i005E6D5664E04CE9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="line_break_after.jpg" alt="line_break_after.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;Happy to share the script if you are interested but I'm not sure that solves your problem as you may end up having to pivot that data if you want it represented the same way as shown in the Before snapshot.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 15:32:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-stop-databricks-adding-quotes-to-multi-line-selections/m-p/150601#M53480</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-11T15:32:04Z</dc:date>
    </item>
  </channel>
</rss>

