SQL Server view to show results of API call? - sql-server

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

Related

How to link Essbase in SQL Server 2014

I need to join SQL Server data with some data from Essbase cube. Result will be in SQL Server. Is it possible to create linked essbase cubu in SQL Server 2014 to query data? Or any other way how to get data physically from essbase to SQL Server not using export files? Something like direct connect.
Thanks,
There aren't any native ways to implement what your want. Setting this up will typically require some sort of automation to extract the data in the cube to a CSV file, then loading that data using SSIS or your preferred ETL tool. The automation to extract data will frequently be a combination of batch file, MaxL and report script or a calc script with a data export command.

Create database schema based on ajax response data

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.

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/

Alternative SQL Server SMO methods

I use SQL Server SMO methods to get SQL Server data such as list of databases.
Is there way to execute above action using ADO.net without sending TSQL parameter to SQL Server?
You can also inspect the system catalog views, e.g.
SELECT * FROM sys.databases
to get a list of databases, or
SELECT * FROM sys.tables
to get a list of tables inside the current database.
Read all about the system catalog views on MSDN.
But I don't understand what you mean here:
Is there way to execute above action using ADO.net without sending TSQL parameter to SQL Server?
???? what exactly (and why?) do you not want to send to ADO.NET or SQL Server?!?!? Please elaborate....

Resources