Skip to content

Best way to get list of tables in parser/schemas.py #6071

Answered by yang6n
yang6n asked this question in Q&A
Discussion options

You must be logged in to vote

After some reading, looks like the get_adapter should be the best option for this.

        adapter = get_adapter(self.root_project)
         with adapter.connection_named("dynamic_sources"):
             schema_relation = BaseRelation.create(
                 schema = source.schema
             )
             relations = adapter.list_relations_without_caching(schema_relation)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yang6n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant