Questions tagged [json-extract]

This tag is intended for questions dealing with accessing and reading data elements or series in JSON objects and/or representing such data elements or series with transformations.

126 questions
0
votes
0 answers

Extract Json field data from array

Trying to query on AWS Athena table which have column containing data as below : [{'abc': {'field1': 1683215785219, 'field2': None, 'field3': None, 'field4': None, 'field5': 1}, 'emp': '40', 'indicator': False, 'Description': 'AAP: Authorization…
dips
  • 3
  • 2
0
votes
0 answers

How to do sqlalchemy query with order_by using bitwise operation extracted from json object attribute

I am trying to do a query and sort by a bitwise value in an attribute that is a json object. I want to sort based on whether a bit is set on an attribute. Here is my class from my sqlalchemy model The json in config attribute of the Disk model would…
0
votes
1 answer

SQL to return rows when certain value exists in Json in a VarChar Column

I am trying to return only the rows when tags column contain "environment" value Table: Data Column: tags VARCHAR ( 40 ) {"environment":"prod", "version":"1:"}, NULL, {"environment":"test"} My existing query extracts "prod" and "test" properly but…
0
votes
2 answers

How can I use get a value stored in a json column in mysql?

id lessons 1 ["3M-232","3M-313"] 2 ["3M-311","3M-312"] 3 ["3M-443","3M-565"] 4 ["4M-232","4M-313"] 5 ["4M-311","4M-312"] 6 ["4M-443","4M-565"] How can get rows that match lessons with "3M-232" as one of them SELECT * FROM…
0
votes
0 answers

JSON nested array Sum values with key

My table structure in MySQL CREATE TABLE `user_data` ( `id` int(11) NOT NULL, `user` varchar(100) NOT NULL, `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`data`)) ) Table…
0
votes
0 answers

How to use json_each with alias() to query in SQLAlchemy/SQLite?

I'm storing JSON documents in one of the columns of an SQLite table. The following query works fine if executed from the SQLite CLI SELECT jsonfield.value FROM dataset, json_each(dataset.samples) as jsonfield WHERE json_extract(jsonfield.value,…
LeMoussel
  • 5,290
  • 12
  • 69
  • 122
0
votes
1 answer

Extracting Json response using Json extractor on Jmeter

Is there's a way I could extract the highest id: "15" of bld-appliance-1 using Json Path expression. Currently if use this Json expression "[?(@.name == 'bld-appliance-1')]..id" it returns me 3 result. I'm also aware I could use Match No but my…
0
votes
1 answer

How to store 2 variable's value into .csv file as 2 separate columns using JSR223 listener in Jmeter

I have two variables whose values i have extracted from the response body using JSON Extractor [Here is the image showing two variables][1] [1]: https://i.stack.imgur.com/E0RKx.png In JSR223 PostProcessor, I have written below code which prints all…
0
votes
1 answer

How to get complete record element from PostgreSQL json_to_recordset() Function?

I want to extract the complete record elements from json_to_recordset(). How to get it. Below is the description of my problem statement: Description I have one column with JSON Type and with the below value where each element of JSON Array are not…
Nikhil Suthar
  • 2,289
  • 1
  • 6
  • 24
0
votes
3 answers

Get the first key from JSON response using JMeter JSON extractor

I am getting below response while running an API. { "bookingId": 0, "bookingIds": { "13320134": "2023-05-01T04:30:00", "13320135": "2023-05-02T04:30:00", "13320136": "2023-05-03T04:30:00" }, "conflictDates":…
rAJ
  • 1,295
  • 5
  • 31
  • 66
0
votes
1 answer

Bigquery how do I extract JSON into different columns only when the row is updated on Bigquery

I have a table with a column which stores data in JSON format. How do I extract JSON values into columns only when there's a new entry or an existing row is updated instead of extracting all the rows everytime. Trying to reduce the cost of bigquery…
0
votes
0 answers

mydumper export cause error:cannot create a JSON value from a string with CHARACTER SET 'binary'

my error was: export cause db error, not import cause error. MySQL version: 5.7.12 and my table defined as: CREATE TABLE `process_ext_info` ( `id` bigint(20) NOT NULL COMMENT 'key', `msg_info` longtext CHARACTER SET utf8 NOT NULL COMMENT 'task…
youbl
  • 134
  • 1
  • 11
0
votes
0 answers

How can I optimize mysql JSON_EXTRACT?

I have a query that is very fast in finding the records it wants, but it takes too long to "extract" the data from the JSON field if I have a few hundred results. Is there a way to speed up the extraction process with this query and data structure?…
shiftyllama
  • 61
  • 1
  • 5
0
votes
0 answers

Read a value from nested JSON in Big query table

I have exported data from JIRA to Bigquery so that I can do customize report and analytics via bigquery. I have a problem with one of the column in bigquery table where i see changelog_histories column have data in nested Json format. I will not…
0
votes
0 answers

Extracting value from a JSON array in a MariaDB table column

Would appreciate if you can help a mariaDB newbie with this. I have a mariaDB database table called 'brand' with data as below. Datatypes are VARCHAR and JSON. name varchar(255) NOT NULL sold longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin…
Baton8546
  • 1
  • 1
1 2 3
8 9