This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | services: | |
| postgres-responder: | |
| image: postgres:16 | |
| container_name: postgres-responder-container | |
| environment: | |
| POSTGRES_DB: credit_score | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: admin | |
| ports: | |
| - 5434:5432 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | FROM postgres:16 | |
| ENV POSTGRES_USER="postgres" | |
| ENV POSTGRES_PASSWORD="secretpass" | |
| ENV POSTGRES_DB="flask_db" | |
| COPY init.sql /docker-entrypoint-initdb.d/ | |
| EXPOSE 5432 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| echo -e "Hostname: "`hostname` | |
| echo -e "Manufacturer: "`cat /sys/class/dmi/id/chassis_vendor` | |
| echo -e "System Main IP: "`hostname -I` | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | services: | |
| postgres_bank: | |
| hostname: postgres_bank | |
| container_name: postgres_bank_container | |
| image: 'postgres:latest' | |
| restart: on-failure | |
| environment: | |
| - POSTGRES_DB=bank | |
| - POSTGRES_USER=postgres | |
| - POSTGRES_PASSWORD=cobapassword | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # kita akan membuat function data validation | |
| def data_validation(data: pd.DataFrame): | |
| # 1. check data shape | |
| n_rows = data.shape[0] | |
| n_cols = data.shape[1] | |
| print(f"Sales data yang memiliki {n_rows} baris dan {n_cols} kolom!") | |
| print("") | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # kita akan membuat function data validation | |
| def data_validation(data: pd.DataFrame): | |
| # 1. check data shape | |
| n_rows = data.shape[0] | |
| n_cols = data.shape[1] | |
| print(f"Sales data yang memiliki {n_rows} baris dan {n_cols} kolom!") | |
| print("") | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | bangun_ruang = "lingkaran" | |
| rusuk = 6 | |
| panjang = 6 | |
| lebar = 5 | |
| tinggi = 9 | |
| jari_jari = 14 | |
| tinggi_tabung = 8 | |
| PI = 3.14 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | services: | |
| # database postgres warehouse | |
| db_sales: | |
| hostname: db_sales | |
| container_name: db_sales_container | |
| image: 'postgres:latest' | |
| restart: on-failure | |
| environment: | |
| - POSTGRES_DB=db_sales | |
| - POSTGRES_USER=postgres | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | with dim_dates as ( | |
| select * | |
| from {{ ref("dim_dates") }} | |
| ), | |
| dim_customers as ( | |
| select * | |
| from {{ ref("dim_customers") }} | |
| ), | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # Virtual Environment Path | |
| VENV_PATH="/home/shandytp/learn-luigi/pertemuan-14/video-learning/venv/bin/activate" | |
| # Activate venv | |
| source "$VENV_PATH" | |
| # set python script | |
| PYTHON_SCRIPT="/home/shandytp/learn-luigi/pertemuan-14/video-learning/etl_process.py" | 
NewerOlder