We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 367d414 commit 624f2b3Copy full SHA for 624f2b3
activitysim/core/inject.py
@@ -84,9 +84,12 @@ def add_step(name, func):
84
return orca.add_step(name, func)
85
86
87
-def add_table(table_name, table):
88
-
89
- if orca.is_table(table_name) and orca.table_type(table_name) == 'dataframe':
+def add_table(table_name, table, replace=False):
+ """
+ Add new table and raise assertion error if the table already exists.
90
+ Silently replace if replace=True.
91
92
+ if not replace and orca.is_table(table_name) and orca.table_type(table_name) == 'dataframe':
93
logger.warning("inject add_table replacing existing table %s" % table_name)
94
assert False
95
0 commit comments