How to create multiple tags and fields for same Point in InfluxDB 2.x

I’m trying to read the covid data from CSV file and want to push to influxdb 2.0,

Below is the JSON which I was using to push the data in influx1.8
json_body = [{
“measurement”: “covidMap”,
“tags”: {“Country”: row[3], “State”:row[2]},
“fields”: {
“Confirmed”: row[5],
“Deaths”: row[6],
“Recovered”: row[7]
}
}]

How we can re-write the same JSON in a single POINT with multiple Tags and fields for the same timestamp

Hello @VIVEK_MISRA,
There are several ways to write CSVs.
Here are a few resources:

https://docs.influxdata.com/influxdb/v2.0/write-data/developer-tools/csv/

If your data has the same fields and tags (i.e. is the same series) then the most recent timestamp will overwrite your last point.

You can add tags to telegraf with:

  • Global tags can be specified in the [global_tags] section of the config file in key="value" format. All metrics being gathered on this host will be tagged with the tags specified here.
  • adding a static tag like
[[inputs.file]]
  files = ["foo"]
  [inputs.file.tags]
    file = "foo"

You can use the CLI to add tags with the #constant header:
https://docs.influxdata.com/influxdb/v2.0/write-data/developer-tools/csv/#define-constants

I hope this helps!