Giter VIP home page Giter VIP logo

kartaca-case-study's Introduction

Veri Mühendisliği - Case Study

Verilen Case, aşağıdaki gibi parçalara ayrılmış ve analiz ediltikten sonra gerekli algoritma kurulup yapılmaya başlanmıştır.

problem-solving

  1. Git üzerinden dosyayı clonelayın veya .zip olarak indirin.

  2. airflow isimli dosyanın içerisinde girin ve burada bir terminal açın.

  3. "docker-compose up airflow-init" komutunu girerek container'ı kurun. Container için gerekli olan config dosyalarının hepsi docker-compose.yaml dosyası içerisindedir.

  4. "docker-compose up" ile container ve içeriklerini ayağa kaldırın. (localhost:8080 üzerinden Airflow ayağa kalkıyor ancak mysql ayağa kalksa da localhost:3306 üzerinden kendi makinemde erişemedim)

Tabloları incelemek için:

  1. Docker desktop üzerinden "mysql-1" üzerinde tıklayıp terminal kısmına geçin ve "mysql -u root -p" yazdıktan sonra gerekli olan şifreyi (kartaca) girin.

  2. "database_queries_for_tables.txt" dosyası içerisinde olan her bir SQL query'sini tek tek (Kod bloğu halinde) çalıştırın. Kodlar aşağıda verilmiştir.

-- country_currency isminde bir database oluşturuyoruz.
CREATE DATABASE country_currency;
-- country isminde bir table oluşturuyoruz
CREATE TABLE country (
  code VARCHAR(2) NOT NULL PRIMARY KEY,
  name VARCHAR(255) NOT NULL
);
-- currency isminde bir table oluşturuyoruz
CREATE TABLE currency (
  code VARCHAR(2) NOT NULL PRIMARY KEY,
  currency VARCHAR(3) NOT NULL,
  FOREIGN KEY (code) REFERENCES country (code)
);
-- data_merge isminde bir table oluşturuyoruz
CREATE TABLE data_merge (
  code VARCHAR(2) PRIMARY KEY,
  name VARCHAR(255),
  currency VARCHAR(3)
);

Airflow üzerinde:

  1. Admin > Connections kısmından yeni bir connection oluşturun.

  2. Aşağıdaki inputları girin:

    • Conn Id : mysql_default
    • Conn Type: MySQL
    • Host: mysql
    • Schema: airflow
    • Login: root
    • Password: kartaca (Eğer olmazsa root deneyebilirsiniz.)
    • Port: 3306

Sonrasında Save ederek connection oluşturmuş olacaksınız.

DAG'ları, yanlarındaki butonlara tıklayarak aktifleştirdikten sonra manuel olarak triggerlayabilirsiniz.

kartaca-case-study's People

Contributors

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