Skip to content

Commit

Permalink
Merge pull request #95 from cal-itp/add-views-to-tbls
Browse files Browse the repository at this point in the history
use inspector for autotable and also add views
  • Loading branch information
atvaccaro authored Jan 17, 2023
2 parents 5e18b46 + fab53e7 commit 53a4129
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion calitp/tables.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from siuba.sql import LazyTbl
from sqlalchemy.engine import Inspector

from .config import is_development
from .sql import get_engine
Expand Down Expand Up @@ -45,7 +46,8 @@ def _init(self):
del self.__dict__[k]

# initialize ----
self._table_names = tuple(self._engine.table_names())
insp = Inspector(self._engine)
self._table_names = tuple(insp.get_table_names()) + tuple(insp.get_view_names())

mappings = {}
for name in self._table_names:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "calitp"
version = "2023.1.3"
version = "2023.1.17"
description = "Shared code for the Cal-ITP data codebases"
authors = ["Andrew Vaccaro <[email protected]>"]
license = "GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007"
Expand Down

0 comments on commit 53a4129

Please sign in to comment.