CorpGlory / csv2influx

A CLI tool for importing CSV files into Influxdb
MIT License
16 stars 6 forks source link

tag schema is not created into the series #43

Open patrickcat opened 6 years ago

patrickcat commented 6 years ago

Hi,

This is a great tool. But I encountered with a problem, after csv data imported into the series, I noticed that 'show tag keys' will return empty thereafter.

I tried one more time using influxdb-nodejs directly, also no tag created at all.

rozetko commented 6 years ago

Hi, @patrickcat! Can you, please, show your .conf.json file?

I guess you use fieldSchema instead of tagSchema. Here is part of example config:

...
    "tagSchema": {
      "location": {
        "from": "location",
        "type": "*" // type of tag can be "*" (any value) or array of possible values
                    // see https://vicanso.github.io/influxdb-nodejs/Client.html#schema
      }
    }
...

I've just run this example and I have proper show tag keys output:

> show tag keys
name: air_quality
-----------------
tagKey
PT08.S2(NMHC)
maxfrigge commented 5 years ago

Had the same issue, which was caused by using "type": "string". Using "type": "*" as suggested by @rozetko fixed it.