This repository is developed just as a template for how to communicate with Google Drive APIs, Elasticsearch, and implement some concepts such as DRY
, SOLID Principles
, and Domain-Driven Design
.
Download 4 zip files from a public Google Drive folder, unzip them, read flat files, join records, and insert results in the Elasticsearch
database. Each flat file contains almost 1 million records.
All settings are set except Google API Key. However, you can change all the settings inside the appsettings.json.
- Set
Download
andUnzip
temp folders, and other settings in theappsettings.json
file (default values have been already set). - Set ElasticSearch URL in the
appsettings.json
file (default value is http://localhost:9200).
In order to prevent the release of API Key in the public repository:
- Set
ASPNETCORE_ENVIRONMENT
environment variable. - Set your Google API Key at
appsettings.[Environment].json
file in theGoogleDriveAccessKey
field.
- If your
ASPNETCORE_ENVIRONMENT
environment variable value has been set to**Product**
, then:- Add
**appsettings.Product.json**
file in theDataIngestion.TestAssignment
project root and set your API Key toGoogleDriveAccessKey
field inside this file.
- Add
- If you did not set any value for the
ASPNETCORE_ENVIRONMENT
environment variable, then you must set your API Key inside theappsettings.json
which is not recommended. Since theappsettings.json
file has already added to the GitHub repository, your API Key may be abused
- Visual Studio 2019 as IDE
- Domain-driven design
- Repository pattern
- Unit Of Work pattern
- Using Nest package for communicating to ElasticSearch
- Using RestSharp for calling Google Drive APIs
- Using NUnit and Moq packages for Unit-Tests