Skip to content
Snippets Groups Projects
Commit 2db14d66 authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Setting GeoAlchemy2 dependency to version 0.5.0, as version 0.6.1 seems not to...

Setting GeoAlchemy2 dependency to version 0.5.0, as version 0.6.1 seems not to accept POINTZ, MULTILINESTRINGZ, ... geometries. Improving schema/table skipping in the field type detector.
parent 23841bbb
No related branches found
No related tags found
No related merge requests found
......@@ -189,9 +189,14 @@ def generate_field_catalog( cfg, catalog=None ):
#field_catalog = generate_field_catalog( cfg, pg_connection, field_catalog )
if isinstance(cfg['postgis']['databases'][dbname], dict) and 'whitelist' in cfg['postgis']['databases'][dbname].keys():
whitelist = cfg['postgis']['databases'][dbname]['whitelist']
schema_dot_table_whitelist = cfg['postgis']['databases'][dbname]['whitelist']
print(schema_dot_table_whitelist)
schema_whitelist = [ x.split('.')[0] for x in schema_dot_table_whitelist ]
print(schema_whitelist)
else:
whitelist = None
schema_dot_table_whitelist = None
schema_whitelist = None
#print(whitelist)
......@@ -207,6 +212,10 @@ def generate_field_catalog( cfg, catalog=None ):
#print(schema_names)
for schema_name in schema_names:
if schema_whitelist is not None:
if schema_name not in schema_whitelist:
logging.debug('Skipping schema %s' % schema_name)
continue
# if schema_name != selected_schema:
# continue
# print(schema_name)
......@@ -216,8 +225,9 @@ def generate_field_catalog( cfg, catalog=None ):
# continue
# else:
# found = True
if whitelist is not None:
if str(table) not in whitelist:
if schema_dot_table_whitelist is not None:
if str(table) not in schema_dot_table_whitelist:
logging.debug('Skipping table %s' % str(table))
continue
try:
......
......@@ -8,6 +8,7 @@ pymongo
#tqdm
# Elasticsearch 6.x
elasticsearch>=6.0.0,<7.0.0
GeoAlchemy2>=0.5.0
# N.B.: GeoAlchemy2 0.6.1 does not accept POINTZ, MULTILINESTRINGZ, ... geometries
GeoAlchemy2==0.5.0
psycopg2-binary>=2.7.0
sqlalchemy>=1.2.0,<1.3.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment