Inserting Json-formatted string into influxdb 2 via line command as csv

Hello!

I have an issue inserting a Json-formatted string into influxdb 2 via line command and csv.
I exported from one measurement into csv, changed the measurement-name in excel and want to import the data via influx write to the database.

Export looks like:
#group,false,false,true,true,false,false,true,true
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string
#default,_result,
,result,table,_start,_stop,_time,_value,_field,_measurement
,0,2023-01-01T04:07:53Z,2023-05-08T15:07:53Z,2023-03-28T06:37:06.408Z,“[”“2023-03-28 08:35:06"”,““2023-03-28 08:37:06"”,”“47"”,““48"”,”“1"”,““3919.525"”,”“3919.534"”,““17587.943"”,”“17587.95"”,““2"”,”“true”“,”“2346.97"”,““2347.002"”]”,value,measurement1

I want to import it again with:
influx write
–bucket the_bucket
–token the_token
–org the_org
–format csv
#group,false,false,true,true,false,false,true,true
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string
#default,_result,
,result,table,_start,_stop,_time,_value,_field,_measurement
,0,2023-01-01T04:07:53Z,2023-05-08T15:07:53Z,2023-03-28T06:37:06.408Z,[”“2023-03-28 08:35:06"”,““2023-03-28 08:37:06"”,”“47"”,““48"”,”“1"”,““3919.525"”,”“3919.534"”,““17587.943"”,”“17587.95"”,““2"”,”“true”“,”“2346.97"”,"“2347.002"”],value,measurement2
"
Somehow I am not able to deal with the double “” and the , in the string.
Can someone pls. tell me how I have to do this.

Thanks!

KR

Hello!

Nobody an idea how I can do this??

Thanks!

KR

have you tried using \ to scape the " string character instead of double quote?

You mean like e.g.

,result,table,_start,_stop,_time,_value,_field,_measurement
,0,2023-01-01T04:07:53Z,2023-05-08T15:07:53Z,2023-03-28T06:37:06.408Z,[\“2023-03-28 08:35:06\”,\“2023-03-28 08:37:06" …,value,measurement2

if so … yes I tried … but didn’t work …