influxdb的docker-compose如何配置
influxdb遇到时间点存储不了

influxdb如何把point中的多个field一起查出来

妙音 posted @ 2021年8月29日 14:39 in influxdb with tags influxdb , 755 阅读
 

问题描述

 
    influx查询包含了水平拆分、垂直拆分. 查询结果的每一条记录record,只对应一个field
 
    写入一个point时包含多个field, 查询时如何将这几个field一起查出来呢?
 

写入示例

 
point := influxdb2.NewPoint("history",
    map[string]string{
        "Version": DedefaultVersion,
        "Name": sh.Name,
        "Active": fmt.Sprintf("%v", sh.Active),
        "PortIdx": fmt.Sprintf("%d", sh.PortIdx),
        "Port": fmt.Sprintf("%v", sh.Port),
    },
    map[string]interface{}{
        "MsgId": fmt.Sprintf("%d", sh.MsgId),
        "Content": sh.Content,
    },
    time.Now(),
    )
 
* 查询
 
from(bucket:"my-bucket")
|> range(start: -10m)
|> filter(fn: (r) => (r._measurement=="history") and (r.Name=="xxxx") )
 
用这个方法查询, 每个record只包含一个_field
 
 

解决方法: 分组

 
    分组之后的record,会多一个table属性。table相同,则为一组。也就是一个point的field。
 
* 按写入时间分组
 
|> group(columns: ["_time"])
 
* 增加id标签,按id分组
 
为每个point增加一个id标签, 然后按id分组
 
 
 
 
Avatar_small
mulberry silk beddin 说:
2021年9月01日 19:46

Thanks for picking out the time to discuss this, I feel great about it and love studying more on this topic. It is extremely helpful for me. Thanks for such a valuable help again.

Avatar_small
AAA 说:
2021年9月03日 00:27

I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much. магазин интернет магазин

Avatar_small
dfg` 说:
2021年9月11日 18:14

Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. lions breath carts

Avatar_small
dfg` 说:
2021年9月12日 21:28

It is actually in a similar fashion an awesome write-up i always most certainly savored investigating. It's not at all really day-to-day i always cultivate the method to seek out a single thing. https://barowatt.com

Avatar_small
Digital_Zone 说:
2021年9月13日 04:18 Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. Zonnepanelen Wetteren
Avatar_small
Digital_Zone 说:
2021年9月13日 04:33

Superior post, keep up with this exceptional work. It's nice to know that this topic is being also covered on this web site so cheers for taking the time to discuss this! Thanks again and again! Kapper zonder afspraak

Avatar_small
Digital_Zone 说:
2021年9月13日 04:40

It’s appropriate time to make some plans for the future and it is time to be happy. I have read this post and if I could I wish to suggest you few interesting things or advice. Perhaps you could write next articles referring to this article. I desire to read even more things about it! Zonnepanelen Wichelen

Avatar_small
Digital_Zone 说:
2021年9月13日 04:45

A great content material as well as great layout. Your website deserves all of the positive feedback it’s been getting. I will be back soon for further quality contents. Aanleggen zwembad

Avatar_small
Digital_Zone 说:
2021年9月13日 04:50

What a sensational blog! This blog is too much amazing in all aspects. Especially, it looks awesome and the content available on it is utmost qualitative. Zonnepanelen Zele

Avatar_small
Digital_Zone 说:
2021年9月13日 04:55

Wow, What an Outstanding post. I found this too much informatics. It is what I was seeking for. I would like to recommend you that please keep sharing such type of info.If possible, Thanks. Ontwerp tuin

Avatar_small
Digital_Zone 说:
2021年9月13日 05:02

Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. Zonnepanelen Zottegem

Avatar_small
Digital_Zone 说:
2021年9月13日 05:07

Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing Ramen en deuren

Avatar_small
Digital_Zone 说:
2021年9月13日 05:13

It is included in my habit that I often visit blogs in my free time, so after landing on your blog. I have thoroughly impressed with it and decided to take out some precious time to visit it again and again. Thanks. Zwembadbouwers Limburg

Avatar_small
Digital_Zone 说:
2021年9月13日 05:19

What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. Zwembadaanleg

Avatar_small
Digital_Zone 说:
2021年9月13日 05:29

I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers Ramen en deuren

Avatar_small
Digital_Zone 说:
2021年9月13日 05:37

Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Ontwerpen tuin

Avatar_small
Digital_Zone 说:
2021年9月13日 05:42

Excellent website! I adore how it is easy on my eyes it is. I am questioning how I might be notified whenever a new post has been made. Looking for more new updates. Have a great day! Exclusief zwembad

Avatar_small
Digital_Zone 说:
2021年9月13日 05:48

Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. Zwembad bouwen

Avatar_small
Digital_Zone 说:
2021年9月13日 05:53

The article looks magnificent, but it would be beneficial if you can share more about the suchlike subjects in the future. Keep posting. Zwembad plaatsen tuin

Avatar_small
Digital_Zone 说:
2021年9月13日 05:58

Pretty good post. I have just stumbled upon your blog and enjoyed reading your blog posts very much. I am looking for new posts to get more precious info. Big thanks for the useful info. Warmtepomp Affligem

Avatar_small
Digital_Zone 说:
2021年9月13日 06:03

I am jovial you take pride in what you write. It makes you stand way out from many other writers that can not push high-quality content like you. Tuinarchitectuur

Avatar_small
dfg` 说:
2021年9月14日 18:26

It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks. Blackpods

Avatar_small
dfg` 说:
2021年9月14日 18:28

I found your this post while searching for some related information on blog search...Its a good post..keep posting and update the information. Blackpods

Avatar_small
Hardik 说:
2021年9月16日 17:58

I’m impressed, I must say. Truly rarely must i encounter a weblog that’s both educative and entertaining, and without a doubt, you have hit the nail about the head. Your concept is outstanding; the thing is something too few people are speaking intelligently about. My business is happy that we stumbled across this within my search for some thing relating to this.
<a href="https://shoppingpossible.com"title="How To Detect A Conference Call On Android">How To Detect A Conference Call On Android
</a>

[url=http://shoppingpossible.com]How To Detect A Conference Call On Android[/url]

Avatar_small
dfg` 说:
2021年9月16日 23:07

Thanks for your insight for your fantastic posting. I’m glad I have taken the time to see this. Hard Money Lenders in Texas

Avatar_small
dfg` 说:
2021年9月17日 14:21

I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. Star Network

Avatar_small
dfg` 说:
2021年9月21日 15:35

I can’t imagine focusing long enough to research; much less write this kind of article. You’ve outdone yourself with this material. This is great content. https://muabannhadat.tv/bat-dong-san/hai-duong

Avatar_small
dfg` 说:
2021年9月24日 14:26

It is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn’t wait reading. I am impressed with your work and skill. Thanks. Buy Organic Seeds

Avatar_small
dfg` 说:
2021年9月26日 15:13

I’ve read some good stuff here. Definitely worth bookmarking for revisiting. I surprise how much effort you put to create such a great informative website. Salem Voice

Avatar_small
what to look in prod 说:
2021年9月27日 01:31

Thanks for the blog post buddy! its really helpful

Avatar_small
Tips to Encourage Yo 说:
2021年9月27日 01:32

This article really helpful for me i really appreciate your work

Avatar_small
Top Backlicks ads po 说:
2021年9月27日 01:33

I find this post really helpful on the internet

Avatar_small
dfg` 说:
2021年9月27日 15:54

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. UK Online Weed Dispensary

Avatar_small
dfg` 说:
2021年9月27日 17:26

An fascinating discussion is value comment. I think that it is best to write extra on this matter, it won’t be a taboo topic however generally people are not enough to talk on such topics. To the next. Cheers poker

Avatar_small
dfg` 说:
2021年9月28日 17:27

Yes, I am entirely agreed with this article, and I just want say that this article is very helpful and enlightening. I also have some precious piece of concerned info !!!!!!Thanks. Citytoprank Business

Avatar_small
dfg` 说:
2021年9月28日 18:48

This is certainly in the process an exceptionally superior ad people very seriously suffered browsing thru. It is actually hardly every single day you'll find associated risk to visit a little something. Fun88

Avatar_small
huram 说:
2021年9月28日 22:30

You ought to basically fantastic not to mention solid advice, which means notice: <a href="https://www.thenewcanadians.com/?fbclid=IwAR3_6ZAviXa01yzNp94ajApHUvZANDZL3ENoZO1NTM26P0DbmDHzOqTs7eg">situs idn poker</a>

Avatar_small
dfg` 说:
2021年9月30日 15:45

Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. Nigerian news and sports

Avatar_small
dfg` 说:
2021年9月30日 17:04

Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information. crowdfunding event ticket

Avatar_small
dfg` 说:
2021年10月02日 18:01

When your website or blog goes live for the first time, it is exciting. That is until you realize no one but you and your. tree care

Avatar_small
YOLO 说:
2021年12月02日 20:22

สล็อต Are you looking for money

Avatar_small
Dr.Billa 说:
2021年12月08日 05:29

The majority of real dildos are phallic-shaped but not all are. Real dildos are a neighborhood of human culture for millennia. Realdildos.com is the premier online dildo store for ladies. Only top quality well priced products get the excellence of being listed online purchasable dildo sex toys

Avatar_small
tonny 说:
2021年12月10日 13:46

Ar Mobile <a href="https://armobileskin.com/mobile-update/">iphone skins</a> is a mobile skin template marketplace where designers can upload their templates for sale. The company's mission is to empower mobile app developers with the ability to customize their apps without having to purchase expensive code libraries. Ar Mobile Skin makes it easy for people who don't have design experience or coding knowledge, but still want to customize their app in ways that are specific to them. Our vision is simple: To provide professional quality skins at an affordable price so everyone can enjoy the benefits of customizing their app!

Avatar_small
john 说:
2021年12月11日 00:02

Vectorgi is an online shop to <a href="https://vectorgi.com">buy and sell digital products</a>
like skin templates. The company was founded in 2014 by a team of creatives with backgrounds in graphic design, product development, and web development. Vectorgi has been involved in the production of over 4 million dollars worth of assets for clients including Virgin America, BMW USA, Nike Asia Pacific, Mercedes-Benz Asia Pacific and more. They offer a wide range of services from designing your very own template or logo to helping you find that perfect color palette for your next project.

Avatar_small
Dr.Billa 说:
2021年12月11日 05:51

Thanks for the marvelous post! ✅ I really enjoyed reading it, you might be a great author. I will certainly bookmark your blog and definitely will come back sometime soon. I want to encourage you to continue your great writing 온라인바카라

Avatar_small
Dr.Billa 说:
2021年12月26日 07:18

I am impressed. I don't think Ive met anyone who knows as much about this subject as you do. You are truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog you have got here pre-loaded vcc

 

 

 

 

 

 

 

Fort Worth Roofing Company Provides Roof Repair, Roof Replacement & Commercial Roofing. We service Tarrant County and surrounding areas. Our roofing company offers free estimates for any repairs, storm damage or total roof replacements. We offer a 5-year warranty on all our work. Insurance claim assistance from a senior insurance claim specialist, along with professional repairs you can trust! Call us today, we are available 24/7 for any emergency roofing problems. We are a General roofing contractor that works on all types of materials. Whether its a Metal roof, Flat roof, Roof pitch, Wood shingle, and more! Fort Worth Roofing is certified by Owens Corning, GAF Materials Corporation, TAMKO Building Products, Inc., and CertainTeed. Call Today! roofing contractor fort worth

Avatar_small
Harry 说:
2021年12月31日 19:59

Oh my goodness! an amazing post dude. Appreciate it Even so We are experiencing issue with ur rss . Do not know why Unable to enroll in it. Is there everyone getting identical rss issue? Anyone who knows kindly respond. Thnkx 바카라사이트

Avatar_small
Dr.Billa 说:
2022年1月02日 05:51

Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon! general coffee state park ga

Avatar_small
asasa 说:
2022年1月07日 21:06

Cool stuff you have got and you keep update all of us. building bellini bal harbour

Avatar_small
Dr.Billa 说:
2022年1月11日 14:30

You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers ✅ Kaamna

Avatar_small
jokergaming 说:
2022年1月11日 20:18

A very excellent blog post. I am thankful for your blog post. I have found a lot of approaches after visiting your post.

Avatar_small
Dr.Billa 说:
2022年1月12日 05:45

Everything is very open with a very clear description of the challenges. It was definitely informative. Your website is very helpful. Thanks for sharing On that website page, you'll see your description, why not read through this nclex review

Avatar_small
joker 123 说:
2022年1月13日 12:51

Yes, I am entirely agreed with this article, and I just want say that this article is very helpful and enlightening. I also have some precious piece of concerned info !!!!!!Thanks.

Avatar_small
vidalista 20 说:
2022年1月14日 05:20

What a really awesome post this is. Truly, one of the best posts I've ever witnessed to see in my whole life. Wow, just keep it up.

Avatar_small
joker slot 说:
2022年1月14日 14:23

Excellent post. I was always checking this blog, and I’m impressed! Extremely useful info specially the last part, I care for such information a lot. I was exploring this particular info for a long time. Thanks to this blog my exploration has ended.

Avatar_small
Honig vom Imker 说:
2022年1月15日 21:44

Very informative post ! There is a lot of information here that can help any business get started with a successful social networking campaign !

Avatar_small
Dr.Billa 说:
2022年1月17日 05:10

This article was written by a real thinking writer✅. I agree many of the with the solid points made by the writer of 토토커뮤니티

Avatar_small
coffee units 说:
2022年1月19日 22:29

Welcome to Coffee Units, the authorized seller of Coffee products in the United State. We offer varieties of products.

Avatar_small
Dr.Billa 说:
2022年1月20日 09:02

This Post is providing valuable and unique information✅ I know that you take a time and effort to make a awesome article aiqisp

Avatar_small
Escorts in Lahore 说:
2022年1月21日 19:09

If you're looking for an escort in Lahore, look no further than a VIP Modules agency. These services offer stunning models and a range of services. The luxury call girls in Lahore have been in business for decades, and have become a valuable part of the city's culture and economy. Aside from sexy call girls, many agencies also offer escorts.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter