import sys
import os
sys.path.insert(0, "../financialScraper")
import pandas as pd
from financialScraper import getqf
from sqlalchemy import create_engine

running = True


# engine = create_engine(os.environ.get('DATABASE_URL'))
engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-205-46.compute-1.amazonaws.com:5432/d376d3nru8envq')
dfdict = getqf.scraper()
df = dfdict['nsdqct.csv']
df.to_sql(name='entries', con = engine, if_exists = 'replace')

import sys
import os
sys.path.insert(0, "../financialScraper")
import pandas as pd
from financialScraper import getqf
from sqlalchemy import create_engine

running = True


# engine = create_engine(os.environ.get('DATABASE_URL'))

engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-205-46.compute-1.amazonaws.com:5432/d376d3nru8envq')
connection = engine.connect()
dfdict = getqf.scraper()
df = dfdict['nsdqct.csv']
df.to_sql(name='entries', con = connection, if_exists = 'replace')

connection.close()

Add engine connection, and close engine connection to worker dyno
Add engine connection, and close engine connection to worker dyno

  import sys
  import os
  sys.path.insert(0, "../financialScraper")
  import pandas as pd
  from financialScraper import getqf
  from sqlalchemy import create_engine
  
  running = True
  
  
  # engine = create_engine(os.environ.get('DATABASE_URL'))
+ 
  engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-205-46.compute-1.amazonaws.com:5432/d376d3nru8envq')
+ connection = engine.connect()
  dfdict = getqf.scraper()
  df = dfdict['nsdqct.csv']
- df.to_sql(name='entries', con = engine, if_exists = 'replace')
+ df.to_sql(name='entries', con = connection, if_exists = 'replace')
  
+ connection.close()
+ 
Add engine connection, and close engine connection to worker dyno
## Code Before:
import sys
import os
sys.path.insert(0, "../financialScraper")
import pandas as pd
from financialScraper import getqf
from sqlalchemy import create_engine

running = True


# engine = create_engine(os.environ.get('DATABASE_URL'))
engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-205-46.compute-1.amazonaws.com:5432/d376d3nru8envq')
dfdict = getqf.scraper()
df = dfdict['nsdqct.csv']
df.to_sql(name='entries', con = engine, if_exists = 'replace')

## Instruction:
Add engine connection, and close engine connection to worker dyno
## Code After:
import sys
import os
sys.path.insert(0, "../financialScraper")
import pandas as pd
from financialScraper import getqf
from sqlalchemy import create_engine

running = True


# engine = create_engine(os.environ.get('DATABASE_URL'))

engine = create_engine('postgres://fkwfcpvbchmxps:VCmxue5WFWCOOHt56aqOm4FD_Z@ec2-54-83-205-46.compute-1.amazonaws.com:5432/d376d3nru8envq')
connection = engine.connect()
dfdict = getqf.scraper()
df = dfdict['nsdqct.csv']
df.to_sql(name='entries', con = connection, if_exists = 'replace')

connection.close()
