gavo.user.importing module

The user interface to importing resources into the VO.

class gavo.user.importing.HideADQLAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: Action

class gavo.user.importing.RetvalWatcher(dispatcher)[source]

Bases: ObserverBase

an Observer giving appropriate program return values.

Basically, we want to return an error signature even if we managed to import things if at least once there was an error notification.

We define this “error occurred but we manage” code to 101 here. I’m sure we can do better than that.

fixRetVal(msg)[source]
retval = 0
class gavo.user.importing.TableCollector(eh)[source]

Bases: ObserverBase

collects the qualified names of tables changed.

This is used to run vacuum analyze on the respective tables before the import exits; the the vacuumAll method of this class can do that once all importing connections are closed (even if an Observer shouldn’t do a thing like that…)

addChangedTable(fqName)[source]
vacuumAll()[source]
gavo.user.importing.main()[source]

parses the command line and imports a set of data accordingly.

gavo.user.importing.process(opts, args)[source]

imports the data set described by args governed by opts.

The first item of args is an RD id, any remaining ones are interpreted as DD ids within the selected RD. If no DD ids are given, all DDs within the RD are processed except those for which auto has been set to False.

opts is either a ParseOption instance or the object returned by main’s parseOption function below.