from sqlalchemy import create_engine
engine = create_engine("sqlite:///hawaii.sqlite")
engine = create_engine(f'sqlite:///../../../ih_final_project_DB/ih_final_project')
con = engine.connect()
nombre_tabla = engine.table_names()
def db_connection(path):
engine = create_engine(path)
connection = engine.connect()
return connection
#endpoint = 'sqlite:///insiders_db.sqlite' #local
endpoint = 'sqlite:////Users/Alysson/Documents/Projects/Hotel-Booking-Cancelation/data/hotels.sqlite' #local
db = create_engine(endpoint, poolclass=NullPool)
connection = db.connect()
protocol = 'postgresql'
password=ETL_config.password
username=ETL_config.username
host = 'localhost'
port = 5432
database_name = 'rate_db'
rds_connection_string = f'{protocol}://{username}:{password}@{host}:{port}/{database_name}'
engine = create_engine(rds_connection_string)
Copyright © Code Fetcher 2022