Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writePoints not working when a tag value includes "\" #643

Open
SimonX200 opened this issue May 31, 2022 · 1 comment
Open

writePoints not working when a tag value includes "\" #643

SimonX200 opened this issue May 31, 2022 · 1 comment

Comments

@SimonX200
Copy link

SimonX200 commented May 31, 2022

Expected Behavior

The tag is stored with its value including the "\"

Actual Behavior

Influx rejects the write request with:

RequestError: A 400 Bad Request error occurred: {"error":"unable to parse 'abc,m=a\\ v=1': invalid tag format"}

Steps/Code to Reproduce the Problem

const influx = require('influx')

const db=new influx.InfluxDB({ database:'abc'});

async function x() {
        let x;
        x=await db.query("create database abc");
        const points = [{ tags: { m: "a\\" }, fields: { v:1 }, measurement:'abc'}];
        x=await db.writePoints(points, {database:'abc'});
        console.log('i1= ', x);
}


x();

With the influx CLI it works if there is an extra space after \
But both the \ and space are then stored

insert abc,a=aa\  x=1

It fails in the influx CLI without the extra space:

insert abc,a=aa\ x=1
ERR: {"error":"unable to parse 'abc,a=aa\\ x=1': invalid tag format"}

The difference is an extra blank between \ and the

Specifications

  • Version: 5.9.3
  • Platform: Windows/Linux
  • Subsystem: Influxdb 1.8.10
@SimonX200 SimonX200 changed the title insertPoints not working when a tag value includes "\" writePoints not working when a tag value includes "\" May 31, 2022
@maxpain
Copy link

maxpain commented Jul 14, 2022

The same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants