148 questions
0
votes
1
answer
85
views
Extracting JSON value in redshift
I am trying to get JSON extract from a column value in redshift.
The column value is like:
[{'IDIndex': '0001', 'History': 4, 'Name': '08-SA-21-C1', 'ActiveFlag': 1, 'Category': 3, 'TotalCount': 0, '...
0
votes
1
answer
355
views
Using JSON_EXTRACT_SCALAR in Trino SQL
panel
alert
date
X
[{"name":"x1","user_text":"","user_text_overflow":""},{"name":"y1","user_text":"",...
0
votes
1
answer
96
views
Json Extract from column in amazon redshift
my query:
SELECT
CAST(employee_id AS INT) AS employee_id,
employee_email,
gender,
custom_fields_json
FROM
xxxxxx_employee
WHERE
employee_id IS NOT NULL
ORDER BY
...
0
votes
1
answer
65
views
Not able to extract nested array subfield in JSON from Athena table
We have an Athena table in which there is a column that contains JSON values.
The datatype of the main column(which contains JSON values) in Athena is a string datatype.
DDL of Athena table is like ...
0
votes
0
answers
41
views
Error converting SUM() result to Int64 in MySQL [duplicate]
I'm using MySQL v5.7.42 and Go v1.21.0 with the volatiletech/sqlboiler v3.7.1 library. I have a table with a JSON column, and I'm trying to sum values extracted from this JSON using JSON_EXTRACT().
...
0
votes
2
answers
181
views
Snowflake, JSON_EXTRACT_PATH_TEXT select all elements attribute in an array of objects
I have this data in a json column
#mycolumn
{
"key": "KEY",
"elements": [
{ "name": "NAME_1" },
{ "name": "NAME_2" }
...
0
votes
1
answer
36
views
How to iterate using a foreach loop to perform multiple deletes with incremental values of previously fetched values?
I have a JMeter test plan and a part of it extracts values from a request's response. So far, I've successfully retrieved three sets of values using JSON extractor and have been able to assess the ...
0
votes
1
answer
64
views
Jmeter json extractor only passes default value
I am using JMeter's JSON extractor to pass a variable id from one request to another.
This is the response of the first request (https://reqres.in/api/users?page=2):
{
"page": 2,
"...
0
votes
1
answer
39
views
how to get the values from json extracted variables?
i am testing on a api and the url link for that api is : https://petstore.swagger.io/v2/pet/findByStatus?status=available
and it returns us a json response and json response varies every time the test ...
0
votes
1
answer
50
views
how to get the last value from the json extracted variable
i am testing the api and i have a request and it returns me a json response and by using the json extractor i have extracted the id from the json data and store it in a variable.
the http request ...
0
votes
2
answers
79
views
PostgresSQL - Json Arrays into Rows
I have a students_data table with a json column like this.
CREATE TABLE students_data (doc_id INT, doc_data JSON);
A row is inserted with doc_id = 101. The json content in the row is:
{
"...
0
votes
1
answer
167
views
JMETER -USING Json extractor, in every thread extract another value, and I want each thread use its own value, how can I do that?
I have a JMETER load test, I use with JSON extractor, I have 30 threads, each one of them run on another data, I want that each variable use in own thread.
For example: each of thread run on another ...
1
vote
1
answer
39
views
Modify the request body based on the JSON extractors from previous request in JMeter
Response from the JSON Request A has 2 values columnID and rowID. These values are extracted using JSON extractors. There is another request B and request Body data looks like this:
{
"...
0
votes
1
answer
25
views
JSON Extracted values not getting updated with iteration
Thread group has 4 requests, first being the Login request.The test plan is executed in a way that login request executes only once and other 3 request are iterated multiple times. A value "...
0
votes
0
answers
115
views
SQLite - how to INSERT nested json data into related tables
In SQLite, I want to insert the following json data into two related tables, form (parent) and waterIntake (child), connected through the foreign key 'currentDate' in waterIntake that references the ...
0
votes
1
answer
80
views
Extracting only the JSON_OBJECT in a JSON array where the object matches condition [duplicate]
I have a table with a JSON column. The JSON column holds for each row, a JSON array with JSON objects such as this
[{"my_value": 42, "category": "A"}, {"my_value&...
2
votes
2
answers
657
views
MySql searching in JSON object with array with objects on specific property value
I have a table 'sometable' with a JSON field named 'jsonval', which contains a JSON object with the property 'programs' that contains an array of objects with the property 'id'
I want to search for ...
0
votes
1
answer
767
views
Query a BigQuery JSON field where all keys have escaped quotes without loading the full JSON and replacing the escaped charecters
I have a BQ table that contains potentially very large JSON objects. I require a only one property (key:value pair) from each JSON object, so it is my preference to first select the JSON property ...
0
votes
1
answer
370
views
extract nested fields from dynamodb json format in redshift/ Unmarshall DynamoDB JSON to regular JSON
My requirement is to create a Materialized view on redshift containing flattened data from nested Dynamodb JSON format. I have tried most of the ways provided by AWS as well as creating a function or ...
0
votes
0
answers
20
views
How to extract assigned value from a variable which is part of the json using JSON_EXTRACT funtion in mysql
Hope, I was able to put the question in right way.
here I have a following table in mysql DB.
Table Name: Company
OrgName
config
TestCompany
{orgld=24,Sector:IT)
How to form a mysql query to extract ...
0
votes
1
answer
289
views
evaluate jsonpath expression for the example
{
"a": [
{
"b": {
"c": [
{
"id": "123"
}
],
"d": {
"e&...
1
vote
1
answer
204
views
JSON fields in Redshift
I am wanting to split out 'housing' key onto different rows. So in this example I would expect 4 rows. Within each row would have the following columns:
id (this is the key on the table), housing.id, ...
0
votes
1
answer
110
views
Need to extract value from the JSON Response which is not start from curly braces
I have below JSON response from the request. I'm aware how to extract value from the response using JSON Extractor but here I have different json response without stating curly braces and it start ...
0
votes
1
answer
105
views
Unable to extract data from JSON in Snowflake
I have a JSON data as below
[
"{\"category\":\"a\"}",
"{\"category\":\"b\"}",
"{\"category\":\"c\"}",...
0
votes
2
answers
395
views
MySQL: JSON_EXTRACT object from array where 2 conditions are true
I have a JSON column that stores an array of objects, each object having 2 properties:
[
{
"title" : "CALCULATED",
"applies" : true
},
{
...
1
vote
1
answer
160
views
Get the value of a property given the name of a key, within a JSON object
I'm trying to get the value of a property, contained inside a JSON object, satisying the condition that the name of another property matches a specific value.
Let's say I've got the followig JSON ...
0
votes
2
answers
868
views
clickhouse extract several values by same key
I have a string which represent array of jsons like
'[{json}, {json}...]' in this jsons I have similar keys like metric: '[{"metric": "", }, {"metric": "", }]'.
...
0
votes
0
answers
48
views
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', '...
0
votes
1
answer
50
views
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
vote
1
answer
852
views
Extracting nested JSON field property Sqlite3
Fiddle link: https://www.db-fiddle.com/f/u6ZXKW8TgFkDH5o2FhppgD/0
I have a query:
SELECT
JSON_EXTRACT(value, '$.characterId') AS character_id,
JSON_EXTRACT(value, '$.voiceActor') AS ...
0
votes
2
answers
96
views
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",...
-1
votes
1
answer
178
views
I want to execute loop depending on the Json Extractor & In loop i want to add another json extractor in Json Expression according to loop iteration
I have added one sampler & get the response of it.
In Response there is Big Json array, like There are multiple AppObjects array & In one AppObjects array there are multiple DSQ array. Now i ...
0
votes
0
answers
104
views
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(`...
0
votes
0
answers
253
views
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 ...
0
votes
1
answer
193
views
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 ...
0
votes
1
answer
382
views
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.sstatic.net/E0RKx.png
In JSR223 PostProcessor,...
0
votes
1
answer
701
views
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 ...
0
votes
1
answer
127
views
how to cast this data as json in mysql?
I have data in one of my table columns as like {x:1,y:2} . I wanted to cast the data to json like
{"x":"1","y":"2"}
I tried to use JSON_QUOTE and cast as JSON ...
1
vote
3
answers
1k
views
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&...
0
votes
1
answer
83
views
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 ...
1
vote
2
answers
694
views
Convert json column content key value pairs to separated key value
My table looks like this:
id
data
1
{tags: {"env": "dev", "owner": "me"}}
I want to fetch the data and inside the select query convert the data column to the ...
-3
votes
1
answer
276
views
How do I write the SQL query to fetch the data (image) from JSON
Json Object
{"images": ["https://bijnis.s3.ap-south-1.amazonaws.com/2487dc60-c3b5-4cf9-a3a2-34f73683ac5a.jpg"],
"remarks": "done",
"documentList": [{...
2
votes
0
answers
456
views
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 ...
0
votes
0
answers
680
views
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 ...
0
votes
0
answers
33
views
Need to get the a value from a specific nested json element using MySQL
Answers to a questionnaire are stored in json in a column in this table. I need to pull out the answer to a specific question stored within this column, but am struggling to do so.
I want to get the ...
1
vote
1
answer
2k
views
json_extract_scalar is not extracting value from json string with single quote
I have an athena record with a json string as below.
{'is_referred': False, 'landing_page': '/account/register'}
I tried to extract the landing_page value with query below but it returns null value.
...
1
vote
3
answers
2k
views
JSON_Extract from list of json string
I want to extract some values for particular keys from a table with json string as below.
raw_data
...
{"label": "XXX", "lines":[{"amount":1000, "category&...
1
vote
2
answers
1k
views
json_extract mysql doesn't work as intended when comparing string and int types
I am trying to extract the value of a key in a json and it isn't being recognized properly :
This is what I expected :
mysql> SET @json_ = '{"year":"2022"}';
Query OK, 0 rows ...
1
vote
1
answer
2k
views
how to extract json keys and values as table with 2 columns mysql 5.7
Having this in column named "value" on table named "test" with varchar data type:
'{"3": "3", "2": "7", "6": "1", "...
0
votes
0
answers
16
views
How can I remove an element from a JSON array using MySQL? [duplicate]
I have a table with JSON data like this:
{"entries": [{"color": "blue", "value": 15, "name": "john"}, {"color": "red", &...