Best practice to query an Azure database that is being updated repeatedly - azure

I have an Azure database (using SQL Database), and also a separate device that measures floats (not relevant to the question).
As and when the data is being updated, say once every 5 minutes, I wish to update the database so that a new row is being formed with this data. I then intend to connect to PowerBI using the Azure database to form graphs etc.
As mentioned in the title, what would be the best practice? I have done my due diligence and it seems that the best way would just be to update the Azure database. Or should I consider updating a CSV file, then connect the CSV file to the Azure database and update it from there?
Reason why I'm considering to go the CSV file route is because I see that Excel has in-built refresh function, but I couldn't find anything from the Azure side.
https://support.office.com/en-ie/article/refresh-an-external-data-connection-in-excel-1524175f-777a-48fc-8fc7-c8514b984440

If you want to use Excel, you can see this Azure official document: Connect Excel to a single database in Azure SQL database and create a report.
Connect Excel to a single database in Azure SQL Database and import data and create tables and charts based on values in the database. In this tutorial you will set up the connection between Excel and a database table, save the file that stores data and the connection information for Excel, and then create a pivot chart from the database values.
Then, you can use the "Refresh Data" and try the tutorial you have found.
Hope this helps.

Related

Azure Database -> Excel Query

I have a query being executed in a Azure server periodically and I need to add some code to it, so it can save some data from Tables/Views to a Excel file during the execution.
I have implemented some code like this on other databases (non-Azures), but executing the same code in Azure gives me messages like "Azure doesn't support" some of the tools I used.
What should I use to do this? I just got to save some Tables data to specific sheets in Excel.
Thanks in advance!
In case if the requirement is specific to Excel file creation ; you can use a logic app to query database from Azure SQL database and generate Excel file based on the below link:
https://community.dynamics.com/ax/b/d365fortechies/posts/logic-app-for-azure-sql-db-to-azure-file-storage-workflow
Note: You can select Excel file generation for Logic app rather than CSV mentioned in the above example or generate an CSV file and then convert into Excel
Since OPENDATASOURCE is not supported in Azure SQL. You also can use other ETL tools to save some data from Tables/Views to a Excel.
Such as Azure data factory:
Using Copy activity in Azure data factory, you can query from table, execute your sql query and execute stored procudure then convert to a Excel file. There are multiple destinations for you to choose to store this excel, cloud or local server.

Back up and restore Azure SQL Database schema

What are the best ways to Back up and restore Azure SQL Database schema in Azure cloud?
I have tried creating bacpac files, but problem with that is, it will be imported as a new database. I want to back up and restore specific schema only within the same database.
Another way i am looking at is creating a sql script file which contains data and schema using SSMS. But here size of the sql script is huge.
Any help is greatly appreciated
We can use bcp Utility for exporting and importing the data in a fast way.
I want to back up and restore specific schema only within the same
database.
There is no native tool for Azure SQL Database that can do backup/restore of some certain schema.
The closest one to the requirements is a bacpac, however it can restore data into the empty or in a new database.
Therefore, a possible option is to move data out and then in using ETL tools like:
SSIS
ADF
Databricks

Azure Data Factory Incremental Load without altering on premises database

I am trying to use Azure Data Factory to perform an incremental load on a database without using a watermark or change tracking technology. I do not have the rights to add watermarks to tables, I can only read data from the target database. The database system does not have an ability to enable change tracking technology. It is also a very large database, which is why I want to be able to incrementally load changes rather than dropping the entire database and re-uploading it every night.
Is there a way to only upload the changes without altering the on-premises database or am I SOL?
I am connecting to an old Sybase database on premises and uploading data to an Azure SQL Server Database.
I would suggest use Data Flow. It provide options 'upsert' for you to allow insert or update the data in Azure SQL database. We don't need to drop the entire database and re-uploading it every night.
Ref here : Sink transformation

How can I connect Excel to my Azure SQL database so I can download and update data?

I read here that I can download data from Azure to Excel:
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-connect-excel
But is there a way that I could then update the data in a row and then have that update go back and change the Azure data or can I only do a dump of the data from Azure to Excel one way?
I find a tutorial about Update an SQL Table from Excel.
It says you can use Excel SQL Spreads.
SQL Spreads solves some common data management problems for Microsoft SQL Server. It makes it fast and simple to update an SQL table from an Excel spreadsheet. And it gives you the control you need to manage data entered by various users on a collaborative team.
Summary:
For more details, please reference How to Update an SQL Table from Excel.
I didn't try it, but I think it's useful for you.
Hope this helps.

Unable to create Easy Tables in Azure

I have created a Mobile App and Database in Microsoft Azure. Now I am trying to create Easy Tables from Mobile App but I am getting error message "You need database to use East Tables. Click here to create one.
Even though I have existing database Easy Tables doesn't list it.
Below is the screenshot.
I have mapped Data Connection with mobile app, below is the screenshot
It would be great if anyone can help, I am new to azure.
Your connection string must be created with name: MS_TableConnectionString
Just because you have a database doesn't mean it is linked. Click on Data Connections, then Add, then add your existing SQL database.
Note that Easy Tables won't recognize the existing tables unless you add them through Easy Tables. There are notes around the format of Id (it needs to be
a string) and other fields.
When you created your Database Server did you check "Allow azure services to access server"? That could be why you cannot see the Database listed.

Resources