-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (27 loc) · 875 Bytes
/
main.py
File metadata and controls
34 lines (27 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import pandas as pd
import os
from etl.extract import extract_data
from etl.transfer import transfer_data
#from etl.load import load_data
from dotenv import load_dotenv
from pathlib import Path
#from config import Config
#import yaml
def main():
# Load environment variables
load_dotenv()
# Load configuration settings
# Define file paths and database URL
#input_file_path = Path("data/academy.csv")
#output_file_path = Path("data/output_data.csv")
#db_url = os.getenv("DATABASE_URL")
#table_name = "my_table"
#Extract data from CSV file
df = extract_data()
# Transfer data to a new CSV file
transferred_df = transfer_data(df)
# Load data into the SQL database
#load_data(transferred_df, db_url, table_name)
if __name__ == "__main__":
main()
print("ETL process completed successfully.")