Showing posts with label Azure. Show all posts
Showing posts with label Azure. Show all posts

Saturday, August 19, 2023

Azure Function Blob Trigger to Import Excel from Blob Storage to CosmosDB

Example code to create an Azure Function Blob Trigger using Python that imports an Excel file sourced from Azure blob storage, convert to a CosmosDB DocumentList, and save to an Azure Cosmos DB NoSQL database.


Monday, August 14, 2023

Azure Application Services

 Azure App Service

Create front-end and back-end web applications.  Development languages supported include:
  • ASP.Net
  • Node.js
  • PHP
  • Python

Azure Static Web App

Create front-end static web application that can connect to back-end APIs and services using client-side scripting.   Supported front-end frameworks include:

  • HTML (no framework)
  • Angular
  • JavaScript
  • jQuery
  • React
  • Vue

Azure Function App

Create API application that can connect to databases, services, and other APIs triggered by an HTTP Request, Message Queue, or Timer.   Development languages supported include:

  • C#
  • Java
  • JavaScript
  • Node.js
  • PowerShell
  • Python
  • TypeScript

Types of Data Store Models

 Relational Database Management System (RDBMS)

Organize data as a series of two-dimensional tables with rows and columns. 

RDBMS solutions include
  • Azure SQL
  • DB2
  • MariaDB
  • MS SQL Server
  • MySQL
  • Oracle
  • PostgreSQL
  • Teradata (Server)

Key-Value Database (NoSQL)

Stores each data value with a unique key.
  • Amazon DynamoDB (Snapchat)
  • Azure Cache
  • Azure Table
  • Cosmos DB
  • Redis

Document Database (NoSQL)

A document that can be into an code object.  JSON or XML for example.
  • Amazon Document DB
  • Cosmos DB
  • Google Firestore
  • MongoDB

Graph Database

Highly-connected datasets.  Uses graph structures for semantic queries with nodes, edges, and properties to represent and store data.
  • Amazon Neptune
  • Cosmos DB for Apache Gremlin
  • MS SQL Server
  • Neo4j
  • Oracle

Object Storage

Storing and retrieving binary files (images, videos, audio, PDFs, documents) 
  • Amazon Simple Storage Service
  • Azure Blob Storage
  • Azure Data Lake Storage

Data Files

Simple flat data files used to store and retrieve data.
  • Apache Parquet
  • Delimited Text Files: Comma Separated Values (CSV), Tab Delimited
  • JSON
  • XML

Data Analytics

Provide parallel solutions for ingesting, storing, and analyzing data.
  • Amazon Athena
  • Apache Hadoop
  • Apache Spark
  • Azure Synapse Analytics
  • Azure Data Lake
  • Azure Databricks (Spark)
  • MS SQL Analysis Services

Wednesday, December 21, 2022

.Net Dependency Injection

.Net Dependency Injection Service Lifetimes:


Transient

Transient lifetime services are created each time they are requested.

Example:

services.AddTransient<IRequest, MyAppRequest>();


Scoped

For web applications, a Scoped lifetime indicates that services are created once per client connection.

Example:

services.AddScoped<ISettings, ClientSettings>();


Singleton

Singleton lifetime services are created the first time they are requested.  

Accessing application configuration or loading static data are examples of when to use Singleton service.

Example:

services.AddSingleton<ISettings, MyAppSettings>();


Extension Methods:

AddBlobServiceClient

Add Azure Blob Storage

Example:


AddDbContext

A Scoped lifetime service used with Entity Framework Core to connect to a database.

Example:

services.AddDbContext<DataContext>(options => options.UseSqlServer("name=ConnectionStrings:SQLConnectionString"), ServiceLifetime.Scoped);


AddOptions

Extension method for adding configuration related options services to the DI container

Example:


AddQueueServiceClient

Azure Queue Service Client. 

Example:


AddSecretClient

Azure Key Vault Secrets

Example:


AddSqlServer

Registers the given Entity Framework DbContext as a service in the IServiceCollection and configures it to connect to a SQL Server database.

Example:

services.AddSqlServer<DataContext>(hostContext.Configuration["ConnectionStrings:SQLConnectionString"]);