How to change the csv export delimiter/character? I need to change it from , to ;

  • 1
  • Question
  • Updated 3 years ago
See Question.

Thanks a lot
Photo of Robert Grossmann

Robert Grossmann

  • 13 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes
Hi Robert,

Can't you do this once you have the file?

Nick
Photo of Roberto Minotti

Roberto Minotti, Employee

  • 51 Posts
  • 5 Reply Likes
you can do it with a normal text editor
Photo of Robert Grossmann

Robert Grossmann

  • 13 Posts
  • 0 Reply Likes
I want to change it in the on-promise hivemanager, so that the export file contains ; as the delimeter.

It is not possible to change it with a texteditor or in Excel, because we use the , in normal descriptions. So search&replace is not possible, it must be implemented in the hivemanager.

Thanks a lot
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes
If there are commas in the normal descriptions, there surely will be quotes around the field value so that it can be parsed correctly? If not, that would be a bug in the export function as escaping/delineation would not be occurring correctly.

Can you confirm if HiveManager is escaping/delineating correctly in the exported CSV?

You will be able to use an appropriate tool to change the delimiter if this is taking place.
(Edited)
Photo of Robert Grossmann

Robert Grossmann

  • 13 Posts
  • 0 Reply Likes
The export function does not quote anything

example:
SN,MAC,NAME,TYPE,POLICY,LOCATION (consists of city, street, floor),IP,MASK,and further...

As you can see search and replace would also replace the , in the location description field. So the delimeter must be set as ; by hivemanager export function
OR the export function must quote the content of the exported fields.

real example (output from exported csv by editor):
12114061200492,E01C41D67480,ap93390603,AP121,AP,kreis_guetersloh_rettungswachen,Rietberg, Bokeler Str. 57,10.170.64.130,255.255.255.192,10.170.64.129,,(276) Germany,radio_ng0,Up,Access,Auto,Auto,radio_na0,Up,Access,Auto,Auto,6.2r1,,,,home
--> no quotes around the location filed content

This leads to unwanted results by importing the csv's to excel and database tools because the location is being divided...

Thanks a lot
(Edited)
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes
Right. That is clearly a bug in HiveManager then. You should open a support case with your point of support so that it can be resolved in a future update.

As a temporary workaround, are you able to change the character to something else in the locations that you define?
(Edited)
Photo of Robert Grossmann

Robert Grossmann

  • 13 Posts
  • 0 Reply Likes
then we have to change the descriptions of many of devices... And description would be different from other systems like monitoring and inventory management.

We will open a case at our distributor, we cant' open ourselve a case at aerohive

Thank a lot
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes
Yup. Your problem is not the choice of delimiter, it is HiveManager not escaping/delineating correctly in its export function. It is a bug and not a feature request therefore.
(Edited)
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes
I have just investigated what Excel does when exporting to a CSV:

A , is encapsulated in double quotes as ","
A " is encapsulated in double quotes and written twice as """"