Create database schema based on ajax response data - sql-server

I want to reproduce the database schema of private sever based on the data that returns by ajax response. My steps: convert json to xml and use it as database schema.
I want to use SQL Server 2012 as RDBMS but don't know how to import xml as database schema. (I know about PostgreSQL which perfecty works with xml but I need SQL Server)
May be there are any tools in SQL Server or external? Or any ideas how to create database schema based on ajax response data.

Related

How to filter on SSIS from Oracle Source

I am using SSIS to pull the data from Oracle database (OLE DB Source) to SQL server (OLE DB Destination).
I'm struggling to filter the data on Oracle level.
The requirement is to read the ID in SQL database and fetch those ID's from Oracle database. The ID is available in SQL server.
How to apply the filter from SQL to Oracle database level?
Query a database based on result of query from another database
See the post with LoopUp Transformation.
"This is a classic case for using LookUp Transformation. First, use a OLE DB Source to get data from the first database. Then, use a LookUp Transformation to filter this data-set based on the ID values from the second data-set. Here is the steps for using a LookUp Transformation:"

Strategy to migrate data from Oracle Database to MongoDB

I have an existing Oracle database with production data. I am planning to move to MongoDB, so I want to migrate my existing data in Oracle database to MongoDB. The Data Model of data stored in Oracle database and MongoDB will be different.
I am planning to get all the data from Oracle database as json using https://blogs.oracle.com/jsondb/generating-json-data. Once I will have the json file with all the data I will import that in the MongoDB. In case the data extracted from Oracle database is not per my required I will create a utility to convert the data to multiple json file for each collection.
I need to some suggestions if there are better ways to this and is my solution right approach for the problem?

SQL Server view to show results of API call?

We have several stored procedures in SQL Server that we would like to start to include XML from a Rest API. Is it possible to create a SQL Server VIEW that will query a rest API that is outputting XML format?
Thank you

Load bulk JSON data into SQL Server table

What is the standard way of loading a bulk of JSON data from a file into a database table in an SQL Server version less than 2016?
I am aware of OPENJSON() function that was introduced in SQL Server 2016. However, I am limited to use SQL Server 2014.
The preferable way of doing this is to import data using SQL Server Integration Services (SSIS), but there is no in-built connector or a source component to start with.
I tried using SSIS JSON Component for this purpose. Apparently, it is not good from performance point of view.
Is there any other way of bulk loading JSON into SQL?
I've done this in SSIS 2012 / SQL Server 2012. The requirement was to consume a RESTful API with various endpoints that returned json.
In your Data Flow, create a Script Component. Most likely it will be of Type = Source since you will be generating OutPuts with Output Columns from it.
Create the various OutPuts and OutPut columns for the various fields / data items you will extract from the JSON. Usually this is several tables as shown below.
In the Scripting Component's CreateNewOutputRows() override method, Deserialize the JSON data into C# classes. I use http://json2csharp.com/ to stub the classes and then fix it if need in special cases, like if the json has ID values for key, instead of keyname and such. I use Newtonsoft.Json to deserialize the json into the class instances / Lists etc. Add rows to the relevant outputbuffer you setup in Step 2.
Connect the Outputs from the Scripting Component to the various destination tables.
That's it! You are done.

How to store data from MongoDB accessed by REST API in SQL-Server database as Table

I am newbie and needs guidance or resources to read. I have two databases, one is in Azure SQL-Server 2012 and the other is in MongoDB at remote location. I access the Azure SQL-Server data using Sql Server Management Studio (SSMS) from my PC and the data of Mongodb in browser using REST API. The retrieved data is in JSON format.
For analysis I want to merge the data from Mongodb in to SQL-Server. I don't know how to store the results of the REST API query as a table in SQL-Server 2012? Note that the columns I want to retrieve from MongoDB are not sub-structured so can easily fit in Relational database.
Azure SQL Database supports OPENJSON function that can parse JSON tet and transform it into a table see https://azure.microsoft.com/en-us/updates/public-preview-json-in-azure-sql-database/

Resources