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

influxdb遇到时间点存储不了

妙音 posted @ 2021年9月23日 14:33 in influxdb , 822 阅读
 

 问题描述

 
    有一份mysql存储的历史数据,准备把它转为influxdb存储, 时间点用的是mysql表中记录的创建时间,创建时间是时许的。
 

环境描述

 
* influxdb: 2.0.8
 
* 开发语言: go
 
* influx客户端: influxdb-client-go 2.5.0
 
 

关键代码摘要

 
    使用如下代码, 创建point,发现存储不了。
 
point := influxdb2.NewPoint("table_name",
    map[string]string{
        ...
    },
    map[string]interface{}{
        ....
    },
    ts,     //对应mysql表中记录的创建时间
    )
 

解决过程

 
    开始以为数据是几年前的, 时间太长存储不了。 后来用time.Time().Add(-xxx), 把时间移到3年前, 结果能存储
 
 

解决办法

 
    原因是influx的精度是纳秒, 存入的时间精度是秒, 在Influx中无法存储
 
    解决办法是加1纳秒, ts.Add(time.Nanosecond*1)
 
Avatar_small
Digital_Zone 说:
2021年10月02日 19:12

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. best worker boots

Avatar_small
johnyking 说:
2021年12月20日 14:36

This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work 토토사이트

Avatar_small
AAA 说:
2021年12月23日 16:56

It’s a pity you don’t have a donate button! I’d definitely donate to this brilliant blog! I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account. I look forward to fresh updates and will talk about this site with my Facebook group. Chat soon! 안전놀이터

Avatar_small
온라인카지노 说:
2021年12月27日 16:33

“Can anyone make money easily?” Did you know that online casinos can also be manipulated? In the case of an online casino, you can manipulate the video to win or lose. It proceeds by manipulating partial (partial) images, or by manipulating all (place, dealer, etc.).

Avatar_small
온라인카지노 说:
2021年12月27日 16:35

“Can anyone make money easily?” Did you know that online casinos can also be manipulated? In the case of an online casino, you can manipulate the video to win or lose. It proceeds by manipulating partial (partial) images, or by manipulating all (place, dealer, etc.).

<a href="https://korea-onlinecasino.com/">바카라사이트</a>

Avatar_small
온라인카지노 说:
2021年12月27日 16:36

“Can anyone make money easily?” Did you know that online casinos can also be manipulated? In the case of an online casino, you can manipulate the video to win or lose. It proceeds by manipulating partial (partial) images, or by manipulating all (place, dealer, etc.).

바카라사이트
Avatar_small
Hair Transplantation 说:
2021年12月29日 17:16

It’s a pity you don’t have a donate button! I’d definitely donate to this brilliant blog! I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account.

Avatar_small
security services lo 说:
2021年12月30日 17:46

United Security Services is one of the leading security guard companies in Los Angeles and has been providing bespoke security solutions in and around Los Angeles since years. To ensure the protection of our clients’ property, possessions, and people, we work closely with them to customize a security solution that fully suits their needs.

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

I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information. building oceana bal harbour For Sale

Avatar_small
ängelholm plantskola 说:
2022年1月12日 03:24

When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style.

Avatar_small
blog comment 说:
2022年1月13日 05:45

This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck

Avatar_small
tadalafil 20mg table 说:
2022年1月14日 05:05

I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon…

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

This is very useful post for me. This will absolutely going to help me in my project.

Avatar_small
rusta och matcha Bro 说:
2022年1月22日 00:01

Hi! This is my first visit to your blog! We are a team of volunteers and new initiatives in the same niche. Blog gave us useful information to work. You have done an amazing job!

Avatar_small
festival 说:
2022年1月25日 04:10

Nothing says Florida like a seafood festival. They are fun, authentic, and the seafood is fresh, often from local waters. Enjoy delectable foods of all types cooked fresh onsite.

Avatar_small
Minimalis Indonesia 说:
2022年1月27日 03:11

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.

Avatar_small
johny 说:
2022年1月30日 23:03 I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... North American Bancard ISO
Avatar_small
marynelson 说:
2022年2月04日 20:35

We are a review website committed to providing comprehensive and trusted reviews for products that matter to consumers. We do the research to help you save time and money. To know more details visit <a href="https://seattlesbestcars.com/">best car seat cover for winter</a>

Avatar_small
baba 说:
2022年2月10日 18:09

Some truly wonderful work on behalf of the owner of this internet site , perfectly great articles . Alexander Malshakov

Avatar_small
AAA 说:
2022年2月16日 14:31

Superb publish, proceeded to go forward as well as saved your website. We can’t wait around to see much more through a person. 메이저사이트

Avatar_small
nhid 说:
2022年2月16日 18:34

CANADIAN DRIVER’S LICENCE
Get High Quality Real Looking Documents to Restore your Limited, Ban or Suspended Accounts. We offer Passport, Driver License, ID, Utility Bill, Invoices, Bank & Credit Card Statement, SSN, Notarization.

Avatar_small
Ellevet Soft Gels 说:
2022年3月01日 02:03

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
Digital_Zone 说:
2022年3月09日 20:14

I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well. Zonnepanelen Pepingen

Avatar_small
Digital_Zone 说:
2022年3月09日 20:25

I am unable to read articles online very often, but I’m glad I did today. This is very well written and your points are well-expressed. Please, don’t ever stop writing. Accumulatieverwarming

Avatar_small
Digital_Zone 说:
2022年3月09日 20:37

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. Thanks... Zonnepanelen Rotselaar

Avatar_small
Digital_Zone 说:
2022年3月09日 20:40

Great job here on _______ I read a lot of blog posts, but I never heard a topic like this. I Love this topic you made about the blogger's bucket list. Very resourceful. Thuisbatterij

Avatar_small
Digital_Zone 说:
2022年3月09日 20:43

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. Zonnepanelen Scherpenheuvel-Zichem

Avatar_small
Digital_Zone 说:
2022年3月09日 20:54

Hey, this day is too much good for me, since this time I am reading this enormous informative article here at my home. Thanks a lot for massive hard work. Zwembad aanleggen

Avatar_small
สล็อตxo 888th 说:
2022年3月10日 06:50

I really thank you for the valuable info on this great subject and look forward to more great posts

Avatar_small
Digital_Zone 说:
2022年3月11日 05:16

The writer has outdone himself this time. It is not at all enough; the website is also utmost perfect. I will never forget to visit your site again and again. Zonnepanelen Sint-Genesius-Rode

Avatar_small
Digital_Zone 说:
2022年3月11日 05:21

I visit your blog regularly and recommend it to all of those who wanted to enhance their knowledge with ease. The style of writing is excellent and also the content is top-notch. Thanks for that shrewdness you provide the readers! Polyester zwembad

Avatar_small
Digital_Zone 说:
2022年3月11日 05:24

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! Zonnepanelen Sint-Pieters-Leeuw

Avatar_small
Digital_Zone 说:
2022年3月11日 05:29

Someone Sometimes with visits your blog regularly and recommended it in my experience to read as well. The way of writing is excellent and also the content is top-notch. Thanks for that insight you provide the readers! Inox zwembad

Avatar_small
Digital_Zone 说:
2022年3月11日 05:32

You delivered such an impressive piece to read, giving every subject enlightenment for us to gain information. Thanks for sharing such information with us due to which my several concepts have been cleared. Zonnepanelen Steenokkerzeel

Avatar_small
Digital_Zone 说:
2022年3月11日 05:34

I just couldn't leave your website before telling you that I truly enjoyed the top quality info you present to your visitors? Will be back again frequently to check up on new posts. Monoblok zwembad

Avatar_small
Digital_Zone 说:
2022年3月11日 05:38

This particular papers fabulous, and My spouse and i enjoy each of the perform that you have placed into this. I’m sure that you will be making a really useful place. I has been additionally pleased. Good perform! Zonnepanelen Ternat

Avatar_small
Digital_Zone 说:
2022年3月11日 05:41

I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. Keramische zwembaden

Avatar_small
Digital_Zone 说:
2022年3月11日 05:47

i am for the first time here. I found this board and I in finding It truly helpful & it helped me out a lot. I hope to present something back and help others such as you helped me. Zonnepanelen Tervuren

Avatar_small
Digital_Zone 说:
2022年3月11日 05:51

Thanks for sharing nice information with us. i like your post and all you share with us is uptodate and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job. Vinylester zwembaden

Avatar_small
Digital_Zone 说:
2022年3月11日 05:54

Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done. Zonnepanelen Tielt-Winge

Avatar_small
Digital_Zone 说:
2022年3月11日 05:57

Wow, this is fascinating reading. I am glad I found this and got to read it. Great job on this content. I liked it a lot. Thanks for the great and unique info. Aanleg zwembad

Avatar_small
Digital_Zone 说:
2022年3月11日 06:03

Succeed! It could be one of the most useful blogs we have ever come across on the subject. Excellent info! I’m also an expert in this topic so I can understand your effort very well. Thanks for the huge help. Zonnepanelen Tienen

Avatar_small
Digital_Zone 说:
2022年3月11日 06:06

An interesting dialogue is price comment. I feel that it is best to write more on this matter, it may not be a taboo topic however usually individuals are not enough to talk on such topics. To the next. Cheers. <a href="https://www.aquapura.nl/lpw_zwembad_modellen/">LPW zwembad</a>

Avatar_small
Digital_Zone 说:
2022年3月11日 06:08

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. Zonnepanelen Vilvoorde

Avatar_small
Digital_Zone 说:
2022年3月11日 06:14

This article is an appealing wealth of informative data that is interesting and well-written. I commend your hard work on this and thank you for this information. You’ve got what it takes to get attention. Monoblock zwembaden

Avatar_small
Digital_Zone 说:
2022年3月11日 06:18

I am unable to read articles online very often, but I’m glad I did today. This is very well written and your points are well-expressed. Please, don’t ever stop writing. Zonnepanelen Wemmel

Avatar_small
Digital_Zone 说:
2022年3月11日 06:22

This is very interesting content! I have thoroughly enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great. Zwembad plaatsen

Avatar_small
Digital_Zone 说:
2022年3月11日 06:22

This is very interesting content! I have thoroughly enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great. Zwembad plaatsen

Avatar_small
Digital_Zone 说:
2022年3月11日 06:25

Remarkable article, it is particularly useful! I quietly began in this, and I'm becoming more acquainted with it better! Delights, keep doing more and extra impressive! Zonnepanelen Tremelo

Avatar_small
Digital_Zone 说:
2022年3月11日 06:28

Today, I was just browsing along and came upon your blog. Just wanted to say good blog and this article helped me a lot, due to which I have found exactly I was looking. Zwembad tuin

Avatar_small
johnyking 说:
2022年4月01日 17:08

I invite you to the page where see how much we have in common. sildalis 120

Avatar_small
data breach lawyer 说:
2022年4月08日 01:47

We are investigating claims against video-conferencing giant Zoom for improperly sharing private data with third parties, including Facebook, and a ?Zoom to Facebook Data Sharing Lawsuit. If you have any questions, please call or contact a Zoom Data Sharing Lawyer today for free.

<a href="https://youtu.be/qGb2CEDu5OE">data breach lawyer</a>

Avatar_small
DraftKings arbitrati 说:
2022年4月08日 17:41

?DraftKings and FanDuel provide an online platform that allows people to win cash prizes in daily fantasy sports contests. The companies have come under fire for allegedly misrepresenting their products, with

<a href="https://youtu.be/c69BHpcA05M">DraftKings arbitration</a>

Avatar_small
asia pacific 说:
2022年4月09日 07:06

Through this post, I know that your good knowledge in playing with all the pieces was very helpful. I notify that this is the first place where I find issues I've been searching for. You have a clever yet attractive way of writing.

Avatar_small
sesso in videochat 说:
2022年4月11日 01:14

Sesso in videochat: camgirls italiane, video e foto porno amatoriali, sesso virtuale.

<a href="https://www.sessoinvideochat.com">sesso in videochat</a>

Avatar_small
ParaGard lawsuit 说:
2022年4月11日 01:14

Somel people who have used ParaGard IUD birth control have complained that they suffered significant and unexpected IUD side effects when attempting to have the birth control device removed. Some of the ParaGard removal complications they have reportedly suffered include:
Fractured/broken IUD

<a href="https://youtu.be/kO-V_J6sZRU">ParaGard lawsuit</a>

Avatar_small
FanDuel arbitration 说:
2022年4月12日 00:15

FanDuel arbitration

​DraftKings and FanDuel provide an online platform that allows people to win cash prizes in daily fantasy sports contests. The companies have come under fire for allegedly misrepresenting their products, with over one million players bringing dozens of class-action lawsuits against DraftKings and FanDuel.

<a href="https://www.youtube.com/watch?v=c69BHpcA05M">FanDuel arbitration</a>

Avatar_small
can you make fake bi 说:
2022年4月15日 00:21

I have bookmarked your website because this site contains valuable information in it. I am really happy with articles quality and presentation. Thanks a lot for keeping great stuff. I am very much thankful for this site.

Avatar_small
BEST SEX DOLLS 说:
2022年4月20日 01:04

THE BEST SEX DOLLS

BestLoveSexDoll.com - THE BEST SEX DOLLS ONLINE STORE IN USA, UK, EU & CANADA

<a href="https://bestlovesexdoll.com">BEST SEX DOLLS</a>

Avatar_small
johny 说:
2022年4月23日 03:15

In this article understand the most important thing, the item will give you a keyword rich link a great useful website page: Table Tennis Tables Melbourne

Avatar_small
Bauunternehmen wien 说:
2022年4月26日 07:10

But do you know that this has given rise to a lot of new bitcoin scams? Yes, that is the truth and sadly, you can be a part of it if you don't know anything related to these scams. This article lets you know about all the types of bitcoin scams that exist. Bauunternehmen wien

Avatar_small
ogłoszenia towarzysk 说:
2022年4月29日 00:17

ogłoszenia towarzyskie
ogłoszenia erotyczne
sex ogłoszenia
Darmowe ogłoszenia towarzyskie i erotyczne z całej Polski.

Avatar_small
somnhjalpmedel 说:
2022年4月29日 01:52

The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought you have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention. somnhjalpmedel

Avatar_small
เว็บพนันออนไลน์ 说:
2022年5月09日 06:21

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.. เว็บพนันออนไลน์

Avatar_small
johnyking 说:
2022年5月09日 21:37 I would like to say that this blog really convinced me to do it! Thanks, very good post. 먹튀검증
Avatar_small
johny 说:
2022年5月11日 00:07 I invite you to the page where you can read with interesting information on similar topics. Caboki Hair fiber in Pakistan
Avatar_small
johny 说:
2022年5月16日 03:08 Wow, cool post. I'd like to write like this too - taking time and real hard work to make a great article... but I put things off too much and never seem to get started. Thanks though. Horny Arcana Apk
Avatar_small
Dave 说:
2022年5月17日 00:40

Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. Satta king

Avatar_small
johny 说:
2022年5月22日 17:14 this is really nice to read..informative post is very good to read..thanks a lot! invicto speedy blue size 5
Avatar_small
Satta king fast resu 说:
2022年5月24日 00:09

"There’re various types of < a href=""https://satta-king-786.info/"">Satta king fast result</a> Satta King 786 Games and every Satta company open different results at a different time of the day. These games are being played all over the world and the Satta result is the outcome that comes in the form of 2 digit numbers and opens it on a fixed time each day. Satta result is the Satta number that decides the winner of the Satta King Fast. You can all the Satta king result; their Satta result is well-arranged on each page as it’s a source of visitors to any website. You can see current and old Satta results, which can help you to bet on the next Satta game.Over a million people are playing Satta lottey game online across India. The money that players receive after winning is the most interesting aspect of this game. The winners are known as Satta King and the results are posted daily on our official website. Calculated risks can earn you big bucks with Satta Result. It is not necessary to invest a huge amount; you can also play with small money. The Satta game is quite easy to learn and play. Your win depends solely on your luck when you select the number randomly. Numbers must be chosen from 0 to 99. The game is risky but interesting. Gali Satta result, Diswar Satta Result, Faridabad result and Ghaziabad result are the 4 most searched keywords in Google. Several times the result gets is leaked in the market which is known as the Satta leak number which can make you rich. Every Satta king 786 result was is announced on time, as Disawar satta result announced at 5:10am, Gali Satta Result announced at 11:30 pm, Ghaziabad result was announced at 8:30 pm, And Faridabad result announce at 6:00 pm.
"


登录 *


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