Solved

JSON to Oracle 12c

Posted on 2013-11-08
7
969 Views
Last Modified: 2013-11-18
I have a json feed, that i would like to import into my oracle DB.

Is there a way of doing this natively with oracle 12c?

Thanks
0
Comment
Question by:FutureDBA-
  • 4
  • 2
7 Comments
 
LVL 73

Expert Comment

by:sdstuber
ID: 39634560
There is no direct json to table import method.

However, if you can convert to xml, you can use oracle's XDB functionality to read and parse it.
0
 

Author Comment

by:FutureDBA-
ID: 39634656
i can get the data in xml as well
0
 

Author Comment

by:FutureDBA-
ID: 39634667
can XDB get the xml feed from a url ?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 39634705
yes, simplest form would be do something like...


select httpuritype('http://some.domain.com/interesting_file.xml').getxml() from dual

which would read the file into an xmltype column

if you need authentication, or schema validation or service interaction then you'll need to use some of the packages to negotiate the communication.
0
 

Author Comment

by:FutureDBA-
ID: 39634718
sdstuber, yeah. before i read this i had just gotten there.

I do need to authenticate with the server.

When i used the above method. I got

ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1817
ORA-29024: Certificate validation failure
ORA-06512: at "SYS.HTTPURITYPE", line 41
29273. 00000 -  "HTTP request failed"
*Cause:    The UTL_HTTP package failed to execute the HTTP request.
*Action:   Use get_detailed_sqlerrm to check the detailed error message.
           Fix the error and retry the HTTP request.

Open in new window


Can you point me in the right direction? thanks as always
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39634747
I can't help with the authentication piece.

As far as parsing a JSON format into Oracle, I posted this a while back.  It's not pretty but it worked in that case:
http://www.experts-exchange.com/Database/Oracle/Q_28241626.html#a39499591
0
 

Author Comment

by:FutureDBA-
ID: 39634800
both feeds json or xml would require authentication, i am looking to oracle wallet manager now to get certificates installed.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now