Code Monkey home page Code Monkey logo

dataingestion's Introduction

DataIngestion

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.

Senario

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.

Application settings

All settings are set except Google API Key. However, you can change all the settings inside the appsettings.json.

  • Set Download and Unzip temp folders, and other settings in the appsettings.json file (default values have been already set).
  • Set ElasticSearch URL in the appsettings.json file (default value is http://localhost:9200).

Google Drive API Key

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 the GoogleDriveAccessKey field.

Example for how to setup API Key in the application settings:

  • If your ASPNETCORE_ENVIRONMENT environment variable value has been set to **Product**, then:
    • Add **appsettings.Product.json** file in the DataIngestion.TestAssignment project root and set your API Key to GoogleDriveAccessKey field inside this file.
  • If you did not set any value for the ASPNETCORE_ENVIRONMENT environment variable, then you must set your API Key inside the appsettings.json which is not recommended. Since the appsettings.json file has already added to the GitHub repository, your API Key may be abused

Tools, design patterns, and approaches:

  • 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

dataingestion's People

Contributors

heidarbozorg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.