Skip to content

Conversation

@linroex
Copy link
Contributor

@linroex linroex commented Aug 17, 2016

Sometime we have many table need insert to caravel tables, I write a command can help people to do this, set a table name prefix or default is data_ , this cmd will scan caravel has table and database all table, compare and insert it.

for _db in db.session.query(caravel.models.Database).all():
for _tablename in _db.get_sqla_engine().table_names():
all_tables += [(_db.database_name, _tablename)]
all_tables = [_ for _ in all_tables if _[1].startswith(prefix)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use something like table instead of _, as it usually used to discard stuff

@linroex
Copy link
Contributor Author

linroex commented Aug 18, 2016

I fix some bug, so close this pr and create another one

@linroex linroex closed this Aug 18, 2016
@dpgaspar dpgaspar mentioned this pull request May 9, 2019
3 tasks
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants