Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I have the following query:
SELECT 'curl -s http://www.mde.operator.com/MRE/api?profile=CANCEL_AUTH&mode=assync-oneway&Auth='||json_extract_path_text(external_reference_id,'transactionIdAuth') + '&NUM=' + phone FROM dbo.cancelled WHERE id like '%Auth%';
It will bring more than 60 thousands results, but the json is broken and I cannot manage to delete the broken lines.
Is there any way to skip the rows which shows any kind of errors?
Note: It isn't null rows.
I've already try:
json_extract_path_text(regexp_replace(event_properties,'\\\\.',''),'someValue')
You can make them null rows though, by setting the null_if_invalid
argument of the json_extract_path_text
function to true
.
Source: https://docs.aws.amazon.com/redshift/latest/dg/JSON_EXTRACT_PATH_TEXT.html
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.