Project

General

Profile

« Previous | Next » 

Revision 117

Preparing map to input from DB

View differences:

scripts/map
70 70
        doc1 = xml.dom.minidom.getDOMImplementation().createDocument(None,
71 71
            dest, None)
72 72
        if in_is_xml: raise Exception('XML-XML mapping not supported yet')
73
        elif in_is_db: raise Exception('DB-XML mapping not supported yet')
73
        elif in_is_db:
74
            import db_xml
75
            
76
            in_db = psycopg2.connect(**in_db_config)
77
            for in_, out in mappings:
78
                value = metadata_value(in_)
79
                if value == None:
80
                    raise Exception('DB-XML mapping not supported yet')
81
            in_db.close()
74 82
        else: # input is CSV
75 83
            metadata = []
76 84
            map_ = {}

Also available in: Unified diff