Is it possible to access data within a table in a dedicated SQL pool in Azure Synapse using REST API endpoints? - azure

I am trying to see whether it is possible to access some data stored within a table in a dedicated SQL in Azure Synapse using REST API but I have not been able to figure much out. I checked the official docs at Microsoft and at most I have been able to query for a specific column within a table, not much more beyond that. I am wondering whether it is even possible to get data through the Azure Synapse REST API. Would appreciate any help.
Docs for reference: https://learn.microsoft.com/en-us/rest/api/synapse/

It is not possible to access the data in Synapse Dedicated SQL pools using REST APIs, today it is possible only to manage compute using REST API.

Related

Cross Database Insert in Azure?

Is it possible for me to insert some data from one database to another in Azure sql?
Let's say I have a trigger in db1 that updates some values in db2.
I read about elastic queries but it seems like they are read-only so they don't solve my problem.
You can't use cross-database in Azure Sql Server because databases can't see eachother physically , you could use elastic pools but they are Read Only.
A solution is to use SQL Managed Instance to upload your instance . This supports cross-database queries but it was expensive.
There was some previous discussion here about doing similar:
C# Azure Function trigger when SQL Database has a new row added without polling
There is also the Azure SQL Bindings for Azure Functions but they are input bindings and not triggers and they're still in preview and limited to C#, JavaScript and Python.
Azure SQL bindings for Azure Functions overview (preview)
There was a new announcement last week after MS Build however for Azure SQL Database External REST Endpoints Integration (hopefully they don't refer to it as ASDEREI) but this is currently in preview under Early Adoption Program (EAP).
Announcing the “Azure SQL Database External REST Endpoints Integration” Early Adoption Program

How can I implement in the Micorsoft Azure / Microsoft Synapse serverless SQL Pool service the Row Level Security feature on external tables?

I am looking at a Data Lake csv file and want to create an external table in the serverless SQL Pool of Microsoft Synapse. The goal is to query this file with Row Level Security constraints in place.
When the external table is created on a dedicated Server, I am able to query the file with Row Level Security constraints in place.
How can I make the Row Level security for external tables on a serverless SQL Pool?
Unfortunately, row level-security is not supported in serverless SQL pool at the moment.
Can you please vote for this on our User Voice?
https://feedback.azure.com/forums/307516-sql-data-warehouse?category_id=171048
You can't use the feature as it is. T-SQL support on Serverless is limited.
E.g. CREATE FUNCTION isn't supported.
This syntax is not supported by serverless SQL pool in Azure Synapse Analytics.
You could of course try to DIY using Views which are supported in Serverless.
In the figure below Entitlements would become another CSV and EXTERNAL TABLE that you would create.
You'll have to either find the right function to get current user and/or role for View's SELECT query, or provide it via some wrapper code from some other place where you maintain your own Context.
Disclaimer: I've not done this in Serverless so can't say for sure.

Find Azure SQL replication problems through an API?

We are using Azure SQL as our database across multiple regions, with one primary and multiple secondaries.
The scenario is, we want to find if there are any active replication problems through some sort of API call / so we can integrate this into our overall environment.
Is there an Azure Management API / or SQL query we can run and build an API on top of - so we can some result like replica DB X is having problems and the data is outdated?
Azure doesn't have an API for this yet. But you should be able to build APIs on top of the views.
There are out of box views 'sys.dm_database_replica_states' and 'sys.dm_db_resource_stats' provided on Azure SQL Database that could be used for your requirement. However, I would recommend you to go through the below link and choose them appropriately:
https://learn.microsoft.com/en-us/azure/azure-sql/database/read-scale-out#monitoring-and-troubleshooting-read-only-replicas
https://learn.microsoft.com/en-us/azure/azure-sql/database/read-scale-out#data-consistency

Azure Data Lake Store exposed via OData

Is it possible to expose an Azure Data Lake Store via OData? The main goal is consume this service in Salesforce (via Salesforce Connect).
If so, should it take place through Azure Data Factory?
Update
A little bit more of context:
We have historical data stored in Azure Data Lake Storage (ADLS) that we want to expose via OData (to be visualised in Salesforce via Salesforce Connect / External objects). After digging into the issue and potential solutions, we don't think ADLS is the right service to be used in this particular case. Instead, we'll might need to configure a Data Factory pipeline to copy the data we are interested in to a SQL Database and read the data from there via a simple ASP.Net application using Entity Data Model and WCF Data Services Entity Framework Provider (got some insights from this website).
I don't think OData has a connector for ADLS. However, given OData is basically a REST API, you could probably build an OData API over the existing ADLS REST APIs if they are not providing what you need. I am not sure how ADF would come into this picture?
Maybe it would be useful if you tell us what you want to achieve?

Azure Mobile Services, DB options

I am trying to get to grips with Azure Mobile Services and am a little lost about which Azure services I should be using for what. When you set up a new Azure Mobile Service you only get the option to create it with Microsoft SQL Server as the database. Can you configure it to use the documentDB service instead?
Also a lot of what I read about Azure Mobile Services seem to be setup around storing data for a particular user. Is this the correct place to store data and query it for all the systems users rather than an individual or should that be handled elsewhere?
thanks
Andy
using the .NET backend, you have a choice of using Azure SQL Database,MongoDB or Table Storage. There's no out of the box support yet for DocumentDB, but you can make it work as shown here
what you store in the storage listed above is up to you, there is no specific reason/restriction/limitation that's its only for user specific data. the samples just happen to show that.
You may use any backend database service. It's true you have to set up SQL when you create a new mobile service space. And the SDK has a Table provider that maps to SQL (or MongoDB). However, you can ignore all that if you want. As long as you can access the appropriate driver for your database-of-choice, you can make calls to the database from the API backend methods. This is especially true when building custom API methods.

Resources