skip to Main Content

Parsing text and JSON from a log file with three lines (request, response, record)

I have a .csv log file containing three json lines for each client. For example: {"name":"John","phone":"08847","politic":"on","ville":"LA","isTest":"false","source":"t3_1"} {"data":{"name":"John","phone":"+8847","city":"LA","source":"t3_1","cameF":"a1"},"token":"bd67a","isTest":false} {"data":{"responseId":"R_2hs","city":"LA","cameF":"cpl_agency2","source":"t3_1"},"success":true,"ts":1721394844,"message":null} I don't understand how you can combine three separate lines into one and then read the json. Starting reading the file: import…

VIEW QUESTION

How to get non repeated rows in postgresql

I have query like select billing_number, created, amount_total_sum, days, country, status, check_in_date, concat(elements->> 'isPossible', elements-> 'UTCDateFrom' ->> 'date', ' - ', elements-> 'UTCDateTo' ->> 'date' ) from (select o.billing_number, o.created, o.amount_total_sum, t.check_in_date, t.check_out_date - t.check_in_date as days, t.hotel_country as country,…

VIEW QUESTION
Back To Top
Search