Ah thanks... so what im looking for is something like ``` SELECT last(*) as "" from vmware_cpu limit 1 ```
I moved over to the pullrequest/issue to see what the devs think. On Mon, Sep 19, 2016 at 7:52 PM, Sean Beckett <[email protected]> wrote: > The AS aliasing only works if you explicitly declare each field. > Otherwise, the * matcher for fields automatically pre-pends the function > name. We intend to allow AS to operate on * matched fields, but for the > first version it was too complex to implement. (See https://github.com/ > influxdata/influxdb/pull/7009) > > Currently, you can use SELECT LAST(*)... or you can have custom field keys > for the output, but not both. > > > On Mon, Sep 19, 2016 at 11:19 AM, <[email protected]> wrote: > >> Moving and downsampling some data between two databases. Need the to >> maintain the names of the values. >> >> ``` >> SELECT last(*) >> INTO "mfcf_vmware"."autogen".:measurement >> FROM /^vmware_.*/ >> WHERE time >= '2016-01-01T00:00:00Z' >> GROUP BY time(30m), "host" >> ``` >> >> This almost worked but the copy of the data has "last_" prefixed for all >> the values. >> >> What's the best way to alias the columns to the original name? >> is there a possible backreference? >> `SELECT last(*) AS .:?origina_name?` >> >> Also can you point me to the location in the documentation that shows >> this? >> If this information is not in the documents then perhaps an issue should >> be created. >> >> Thanks >> >> -- >> Remember to include the InfluxDB version number with all issue reports >> --- >> You received this message because you are subscribed to the Google Groups >> "InfluxDB" 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/ms >> gid/influxdb/5463f361-4501-4210-9354-a144eedb08f1%40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Sean Beckett > Director of Support and Professional Services > InfluxDB > > -- > Remember to include the InfluxDB version number with all issue reports > --- > You received this message because you are subscribed to a topic in the > Google Groups "InfluxDB" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/influxdb/hMfAITLnloA/unsubscribe. > To unsubscribe from this group and all its topics, 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/CALGqCvPsvg9u-vaTAmna5EF%2BoOPv- > kqnHQLv22EneuXHn5zbZg%40mail.gmail.com > <https://groups.google.com/d/msgid/influxdb/CALGqCvPsvg9u-vaTAmna5EF%2BoOPv-kqnHQLv22EneuXHn5zbZg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Remember to include the InfluxDB version number with all issue reports --- You received this message because you are subscribed to the Google Groups "InfluxDB" 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/CAAcLdHM7%2BcEn2C_ywq0DUwbOcAGMFG1Bbt4abpq4WT6c8TFVTA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
