question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inserting string values like "with space" result in "with\ space"

See original GitHub issue

I’m not able to implement the following insert: INSERT cpu,host=serverA,region=us_west value="with space" or via REST: curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu,host=server02 value="with space"

Could you verify and post a piece of code to not escape spaces with "\ "?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
djpablecommented, Jul 5, 2017

I have read it well, I copy and past it here so you can read it better:

Special Characters For tag keys, tag values, and field keys always use a backslash character \ to escape:

  • commas ,
  • equal signs =
  • spaces For measurements always use a backslash character \ to escape:
  • commas ,
  • spaces For string field values use a backslash character \ to escape:
  • double quotes " Line Protocol does not require users to escape the backslash character . Users do not need to escape all other special characters. Examples Example 1: Write a point with special characters `

INSERT “measurement\ with\ quo⚡️es\ and\ emoji”,tag\ key\ with\ sp🚀ces=tag,value,with"commas" field_k\ey=“string field value, only " need be esc🍭ped” `

You are talking abut tags, i’m talking about values. For values only double quotes need to be escaped… try the insert example 😉

1reaction
tihomir-kitcommented, Oct 4, 2017

I updated the PointFormatter to match the docs. Not deployed to nuget yet because I have a few more things to update in the library before that. If you need this asap, feel free to use the dev branch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inserting string values like "with space" result in "with\ space"
I'm not able to implement the following insert: INSERT cpu,host=serverA,region=us_west value="with space" or via REST: curl -i -XPOST ...
Read more >
Insert a space character before and after a specific string ...
I require an update statement that will run and insert spaces before and after the string "effective from". So in the following data......
Read more >
Inserting space in a string based on the number of ...
I have a column LegalDesignation inside OwnerNames tbl. i would like to find all the incidents where LegalDesignation is 4 characters long
Read more >
How to pad a string with spaces when size of data is ...
When selecting character data, I'm trying to pad the data with spaces so that the length of what I'm returning is the same...
Read more >
How the SPACE() Function Works in SQL Server (T-SQL)
In SQL Server, you can use the T-SQL SPACE() function to generate a specific number of spaces. This can be handy for adding...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found