Azure Knowledge
These are my posts with knowledge about Azure services and usage.
Azure CosmosDB
Azure CosmosDB query examples
Azure Cloud Functions
Azure Functions - Introduction
These are my posts with knowledge about Azure services and usage.
Azure CosmosDB
Azure CosmosDB query examples
Azure Cloud Functions
Azure Functions - Introduction
Files that compose an Azure Function:
Create a resource -> Compute -> Function App.
The function name has to be unique.
Create new resource group.
You can choose the OS.
Storage:
Create a new recommended storage.
It offers to create an application insight instance for us. This stores logs and diagnostic information. This is really recommended.
On Configuration > Application settings you can create sys envs which will appear in your code.
There’s a storage explorer where you may see the contents for your function in real time.
There’re a lot of trigger types
Input / Output Bindings
To work with Azure Functions, you may work with Visual Studio. There’s an option to enable “Azure Development” with which you’ll be able to project and run your functions locally.
Azure Functions are based in serverless programming. They integrate easily with other Azure services. You provide Code to execute and an event that triggers it.
For example to run background tasks every hour.
They’re brilliant for:
Azure Functions is built on top of the web jobs SDK and it’s hosted on the app service platform.
With VM you can install whatever you want: web servers, services etc. This is known as IaaS (infrastructure as a service). You can choose OS and have complete control of the server, but you’re responsible for it: Patching, maintaining, scaling, operational overhead.
This are examples of queries to use for Azure CosmosDB, as this database uses a restricted version of SQL and it doesn’t allow all queries or joins.
To be used with the main, partial query. This query starts with something such as SELECT * FROM c
WHERE c.ts LIKE "%2022/03/10%"
ORDER BY c.ts DESC
WHERE c.type = "Writeable"
AND c.ts LIKE "%2022/03/10, 15:2%"
ORDER BY c.ts DESC
Normal SQL queries to be used as custom queries. Note that CosmosDB doesn’t support a 100% of all SQL statements.
(count number of entries)
SELECT COUNT(1) FROM c
WHERE c.ts LIKE "%2022/03/10%"
ORDER BY c.ts DESC