Discussion:
[influxdb] Adding a point with a different tag set and field set to an existing measurement alters the schema :
g***@gmail.com
2017-11-09 09:28:28 UTC
Permalink
insert debug,host=us3333,result=PASS ctnrName="sakshi.ctnr.1",prj="xyz.12"
selec^C
show measurements
name: measurements
------------------
name
build
create
debug
select * from "debug"
name: debug
-----------
time ctnrName host prj result
1510218785437764998 sakshi.ctnr.1 us3333 xyz.12 PASS
show tag keys from "debug"
name: debug
-----------
tagKey
host
result
show field keys from "debug"
name: debug
-----------
fieldKey fieldType
ctnrName string
prj string
insert debug,host=us3333 result="PASS",ctnrName="sakshi.ctnr.1",prj="xyz.12"
select * from "debug"
name: debug
-----------
time ctnrName host prj result result_1
1510218785437764998 sakshi.ctnr.1 us3333 xyz.12 PASS
1510218845910180112 sakshi.ctnr.1 us3333 xyz.12 PASS
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/929bf94b-e5dc-46a8-bffd-18ee5c56d174%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
s***@gmail.com
2017-11-09 14:52:39 UTC
Permalink
I noticed that in the first insert you have the result=PASS as a tag (before the " "), but in the second insert you added it to the fields (after the " ")

This is why you are seeing the "result" tag and "result_1" field in your query.
insert debug,host=us3333,result=PASS ctnrName="sakshi.ctnr.1",prj="xyz.12"
insert debug,host=us3333 result="PASS",ctnrName="sakshi.ctnr.1",prj="xyz.12"
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/e7bdb986-f538-47b0-b931-1e003b95df46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frank Inselbuch
2017-11-09 23:22:42 UTC
Permalink
The behavior you are seeing is by design.
You can insert data with a field and a tag with the same name and that data
is distinct.
I believe this should be prevented by IFX and result in an error.
Why don't you raise this as an issue and then the rest of us can +1 it.
insert debug,host=us3333,result=PASS
ctnrName="sakshi.ctnr.1",prj="xyz.12"
selec^C
show measurements
name: measurements
------------------
name
build
create
debug
select * from "debug"
name: debug
-----------
time ctnrName host prj result
1510218785437764998 sakshi.ctnr.1 us3333 xyz.12 PASS
show tag keys from "debug"
name: debug
-----------
tagKey
host
result
show field keys from "debug"
name: debug
-----------
fieldKey fieldType
ctnrName string
prj string
insert debug,host=us3333
result="PASS",ctnrName="sakshi.ctnr.1",prj="xyz.12"
select * from "debug"
name: debug
-----------
time ctnrName host prj result result_1
1510218785437764998 sakshi.ctnr.1 us3333 xyz.12 PASS
1510218845910180112 sakshi.ctnr.1 us3333 xyz.12 PASS
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/bc905693-0030-4a37-82c6-56b44b1e5fa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'gupta01sakshi@gmail.com' via InfluxData
2017-11-14 08:02:03 UTC
Permalink
Following is the link of the issue raised:
https://github.com/influxdata/influxdb/issues/9108.
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/6fc14838-89a5-4727-8f01-6371f659370d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...