Giter VIP home page Giter VIP logo

dkatalis-dwh-sol's Introduction

DWH Coding Solution

Task 1

The solution for this task is written in Python v3.8 and the file name is task_1.py.

tabulate package is required to show the result in tabular.

Solution Summary

The first step of the code is to sort all the files in the given path by the timestamp stored inside each files. Then, it will read the data from the oldest timestamp. Depends on the operation, it will just create a new record if the operation is equal to c; but if the operation is equal to u, it will also create a new record including the information from the last c operation with the same id.

Finally, the result will be returned in Dataframe.

Task 2

The solution for this task is written in Python v3.8 and the file name is task_2.py.

tabulate package is required to show the result in tabular.

Solution Summary

First, it will use the method from the first task which is to read all data and store them in Dataframe. Then, to get the result in a denormalized table, it will do the following steps:

  1. Get the Cards data with respective Account ID
  2. Get the Savings Accounts data with respective Account ID
  3. Fill every event with the Account, Cards and Savings Accounts
  4. Clean up some data
  5. Choose which fields to show and rename them if needed

Task 3

Based on what the result shown, the transaction of the Saving Accounts happens 4 times while for the Cards happens 3 times.

Each of the transaction at the following event:

Savings Account transactions: timestamp - value

  1. 1577955600000 - 15000
  2. 1578648600000 - 40000
  3. 1578654000000 - 21000
  4. 1579505400000 - 33000

Card transactions: timestamp - value

  1. 1578313800000 - 12000
  2. 1578420000000 - 19000
  3. 1579361400000 - 37000

dkatalis-dwh-sol's People

Contributors

presidenri avatar

Watchers

 avatar  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.