How to exclude the quotes(") inside the columns of CSV exports generated from DBeaver

Viewed 1052

I tried to take a csv export of my database results set to a CSV from the Dbeaver.I want to get the output without any quotes inside the columns but there should be quotesand at the start of a row and at the end (including header).

e.g - "Header1|Header 2|Header 3|"

But what I'm getting from the DBeaver is either having quotes at the start of a row and also inside some of the columns(and not at the end) or get it without a single quote.Below mentioned are the two options that I have observed.

e.g - option 1 - "Header1|"Header 2"|Header 3|

option 2 - Header1|Header 2|Header 3|

I couldn't find an option to remove the inside quotes. Any thoughts on this? Should I look for a different approach? I have attached a photo of the settings section.

enter image description here

2 Answers

configuration setting

  • Characters escape: escape
  • Quote character:

Notice that Quote character is not empty, it is a single space.

Try .strip('""')

Example:

a_string = '"ab"cd"'

stripped_string = a_string.strip('"')

print(stripped_string)

OUTPUT

ab"cd

Related