diff --git a/go.mod b/go.mod index 51d657ea9..21927ea8d 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/amir/raidman v0.0.0-20170415203553-1ccc43bfb9c9 github.com/antchfx/jsonquery v1.3.3 github.com/antchfx/xmlquery v1.4.0 - github.com/antchfx/xpath v1.3.0 + github.com/antchfx/xpath v1.3.1 github.com/apache/arrow/go/v13 v13.0.0 github.com/apache/arrow/go/v16 v16.0.0-20240319161736-1ee3da0064a0 github.com/apache/iotdb-client-go v1.2.0-tsbs diff --git a/go.sum b/go.sum index fb4ab163d..104a63c07 100644 --- a/go.sum +++ b/go.sum @@ -820,8 +820,9 @@ github.com/antchfx/jsonquery v1.3.3/go.mod h1:1JG4DqRlRCHgVYDPY1ioYFAGSXGfWHzNgr github.com/antchfx/xmlquery v1.4.0 h1:xg2HkfcRK2TeTbdb0m1jxCYnvsPaGY/oeZWTGqX/0hA= github.com/antchfx/xmlquery v1.4.0/go.mod h1:Ax2aeaeDjfIw3CwXKDQ0GkwZ6QlxoChlIBP+mGnDFjI= github.com/antchfx/xpath v1.2.3/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= -github.com/antchfx/xpath v1.3.0 h1:nTMlzGAK3IJ0bPpME2urTuFL76o4A96iYvoKFHRXJgc= github.com/antchfx/xpath v1.3.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= +github.com/antchfx/xpath v1.3.1 h1:PNbFuUqHwWl0xRjvUPjJ95Agbmdj2uzzIwmQKgu4oCk= +github.com/antchfx/xpath v1.3.1/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= diff --git a/plugins/parsers/xpath/testcases/openweathermap_json.conf b/plugins/parsers/xpath/testcases/openweathermap_json.conf index d9b3e04b6..15662f0f9 100644 --- a/plugins/parsers/xpath/testcases/openweathermap_json.conf +++ b/plugins/parsers/xpath/testcases/openweathermap_json.conf @@ -4,9 +4,9 @@ # testcases/openweathermap_5d.json xpath_json # # Expected Output: -# weather,city=London,country=GB humidity=70i,clouds=100i,wind_direction=252,wind_speed=2.03,temperature=137.86666666666667,precipitation=0 1596632400000000000 -# weather,city=London,country=GB wind_direction=252,wind_speed=2.03,temperature=138.42222222222225,precipitation=0,clouds=100i,humidity=71i 159663600000000000 -# weather,city=London,country=GB humidity=71i,clouds=100i,wind_direction=252,wind_speed=2.03,temperature=138.9777777777778,precipitation=0 159667200000000000 +# weather,city=London,country=GB humidity=70i,clouds=100i,wind_direction=252,wind_speed=2.03,temperature=137.86666666666667 1596632400000000000 +# weather,city=London,country=GB wind_direction=252,wind_speed=2.03,temperature=138.42222222222225,clouds=100i,humidity=71i 159663600000000000 +# weather,city=London,country=GB humidity=71i,clouds=100i,wind_direction=252,wind_speed=2.03,temperature=138.9777777777778 159667200000000000 # metric_name = "'weather'" @@ -23,7 +23,6 @@ timestamp_format = "unix" clouds = "clouds/all" [fields] - precipitation = "number(main/precipitation)" wind_direction = "number(wind/deg)" wind_speed = "number(wind/speed)" temperature = "(number(main/temp) - 32.0)*(5.0 div 9.0)"