​If you don't use a `GROUP BY *` at the end of a `SELECT ... INTO ...`
query, then any tags are automatically converted to fields. You're most
likely seeing the new tags with numbers due to there already being a field
by the same name. This is mentioned in the documentation here
<https://docs.influxdata.com/influxdb/v1.1//query_language/data_exploration/#common-issues-with-the-into-clause>
.

You'll want to update your query to look more like:

```

select * into pgdata2 from pgdata1 group by *
```

To carry the tags over correctly.

On Wed, Jan 11, 2017 at 5:53 AM, <[email protected]> wrote:

> Hi!
>
> I'm using Telegraf's postgresql_extensible input to store values into
> Influxdb, and I found that after renaming/migrating the measurement by this
> influxdb command:
>
> "select * into pgdata2 from pgdata1"
>
> and later inserting the new data (same tags) into the new measurement
> 'pgdata2' there will be some new tags, for example host becomes host_1, db
> becomes db_1, but the actual value tag stays the same.
>
> If I migrate again into pgdata3, then there will be host_1_1, db_1_1. So
> now I have three similar tags: host, host_1, host_1_1. (New data goes into
> the last one.)
>
> I checked Telegraf with tcpdump and I saw that Telegraf was sending the
> correct names.
>
> Is this behavior a bug or I just don't know something?
>
> Regards,
> Krisztián
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/19f673d5-3469-4bc5-b2d4-c90f026002ca%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAD8sRLCBK5SjUgoGDjNVO7AbOz%3D%2BTx_wNUJ%3DYpZ_sGx87VpoAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to