Change data type of a series

Hi,
a series in my DB is stored as boolean, but it should be numeric data. Is it possible to change the data type?

best regards,
Kevin

PS: I dont know why it started as boolean, as it was a numeric from the start.

Hi,

You have to change in the DB itself

Welcome @Kevin_T to the Influx forum.

Have you tried using a map() function using the int() function, like this? More info here.

|> map(fn: (r) => ({r with exampleCol: int(v: r.exampleCol)}))

@AVVS_Sudheer [AVVS_Sudheer]
that is what I am searching for. But where do I find the DB and how do I change the types?
All I found are general settings of the buckets and the data explorer, where I can browse the data…

@grant1 [grant1]
I am pretty new to influxdb, so I am trying to understand your answer. If I understand it correct your proposal is to convert all existing data in integer and rewrite it to the DB? Would that change the datatype?

Hi Kevin,

Ask your DB team what db they are using. In Influx settings you can’t find which db you are using. Is it influxdb or some other db? If you change the data type in db, then it will effect in the front end (influx)

Yes, per the link I included:
int() converts a value to an integer type.

Hi Grant,

I tried, it is working fine for me

My problem seems to be solved. The data types seem to have changed - even if I dont know how I did it. Probably it was the query from grant1.

Nevertheless I am interested in how to manage the influxdb.

@AVVS_Sudheer
Ask your DB team what db they are using. In Influx settings you can’t find which db you are using. Is it influxdb or some other db? If you change the data type in db, then it will effect in the front end (influx)

This is private, so I am the DB team. I am running the influxdb docker on my NAS. I thought the influx frontend is the place to manage the db. Do I need a management tool to change the data type in my db backend?