Code exercise for data ingestion using .Net Core Framework.
- Download the data from Azure Storage to a local file.
- Ingest the data from the local file into a SQL Server local.
- Add Unit Testing.
- Automated tests is optional.
- Created a Console Application using Dependency Injection with a service container.
- Used SAS tokens for authentication to the Azure Storage Service.
- Used SqlBulkCopy to ingest the data to the local Sql Server.
- Serilog library for logging.
- CsvHelper library to read the csv file.
- xUnit for unit testing.
- Install the Azure Storage Local Emulator
- Create a "stock" blob container
- Create a "data" folder inside the "stock" container
- Upload a csv file to the data folder as the source of the data
- Setup the configuration values at the local.settings.json file
- Create the "AcmeDB" database in your local sql server using the DatabaseScript/database.sql file
- Add the connection string for the database to the local.settings.json file
- Build the project and run the ImporterConsoleApp.
- Run the tests using dotnet test.