1

I am trying to use Oracle JSON_OBJECT to write a query to generate a specific json format.

Here is a sample query (the real query is more complex):

SELECT JSON_OBJECT('name' value name)
  FROM table_a
 WHERE name = 'John'

The query is working in Oracle. I used ExecuteSQL processor and put this query in it. It shows

illegal character in JSON_OBJECT('name' value name)

Any suggestions?

0

1 Answer 1

1

You most likely need to give the column an alias. Nifi probably doesn't like having spaces, single quotes, or parenthesis in the column name.

select json_object('name' value NAME) as json_with_name
from table_a
where NAME = 'John';
Sign up to request clarification or add additional context in comments.

1 Comment

Perhaps... but why would the error mention an "illegal character"?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.