Ejemplo n.º 1
0
sourcePath = config.get('Files', 'sourcePath')

from tableloader.tableFunctions import *

print "connecting to DB"

engine = create_engine(destination)
connection = engine.connect()

from tableloader.tables import metadataCreator

schema = None
if database == "postgresschema":
    schema = "evesde"

metadata = metadataCreator(schema)

print "Creating Tables"

metadata.drop_all(engine, checkfirst=True)
metadata.create_all(engine, checkfirst=True)

print "created"

import tableloader.tableFunctions

blueprints.importyaml(connection, metadata, sourcePath)
categories.importyaml(connection, metadata, sourcePath)
certificates.importyaml(connection, metadata, sourcePath)
graphics.importyaml(connection, metadata, sourcePath)
groups.importyaml(connection, metadata, sourcePath)
Ejemplo n.º 2
0
print "connecting to DB"


engine = create_engine(destination)
connection = engine.connect()



from tableloader.tables import metadataCreator

schema=None
if database=="postgresschema":
    schema="evesde"

metadata=metadataCreator(schema)



print "Creating Tables"

metadata.drop_all(engine,checkfirst=True)
metadata.create_all(engine,checkfirst=True)

print "created"

import tableloader.tableFunctions

blueprints.importyaml(connection,metadata,sourcePath)
categories.importyaml(connection,metadata,sourcePath,language)
certificates.importyaml(connection,metadata,sourcePath)