inspectomop.inspector.Inspector¶
- class inspectomop.inspector.Inspector(connection_url)¶
Creates an Inspector object which can be used to run OMOP data queries
- connection_url¶
A connection url of form ‘dialect+driver://username:password@host:port/database’. The driver can be any currently supported by sqlalchemy (sqlite, mysql, postgresql, etc.).
- Type:
Notes
SQLite DBs require an additional ‘/’ as in ‘sqlite:///foo.db’ for a relative path and ‘sqlite:////abs/path/to/foo.db’ for an absolute path.
See http://docs.sqlalchemy.org/en/latest/core/engines.html for more information about connection URLs and supported dialects.
Examples
>>> import inspectomop as iomop >>> connection_url = 'sqlite:///:memory:' >>> iomop.Inspector(connection_url)
- __init__(connection_url)¶
Methods
__init__(connection_url)attach_sqlite_db(db_file, schema_name)For SQLite backends, attaches an additional sqlite database file.
connect()Provides a Connection to the underlying database from the connection pool.
table_info(table_name)Return a Pandas DataFrame describing the fields and properties of a table.
Attributes
A dictionary containing all of the
ClinicalOMOP CDM tables in the connected database.password@host:port/database' used to specify the dialect, location, etc.
A dictionary containing all of the
Derived ElementsOMOP CDM tables in the connected database.A convenience hook to the underlying sqlalchemy engine.
A dictionary containing all of the
Health EconomicsOMOP CDM tables in the connected database.A dictionary containing all of the
Health SystemOMOP CDM tables in the connected database.A dictionary containing all of the
MetaDataOMOP CDM tables in the connected database.A dictionary containing all OMOP CDM tables in the connected database.
A dictionary containing all of the
VocabulariesOMOP CDM tables in the connected database.