Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResolvedStatement - ResolvedTableScan not getting the full table name due to backtick placement #126

Open
leoch20 opened this issue Dec 23, 2022 · 0 comments

Comments

@leoch20
Copy link

leoch20 commented Dec 23, 2022

Hello,

I implemented sub catalogs as recommended here #125 to analyze queries with different table names backtick placements.

While looking to extract the columns, along with their table, from a query the ResolvedNodes.Visitor() does not return the fully qualified table name:

select col from `some-project`.ds.table_name  

.getFullName() returns table_name.

Is there a way to get the project and dataset?


Here is my visitor in scala

    statement.accept(new ResolvedNodes.Visitor() {
      override def visit(node: ResolvedNodes.ResolvedTableScan): Unit = {
        val table = node.getTable
        table.getColumnList.forEach(col => (table.getFullName, col.getName))
        super.visit(node)
      }
    })
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

No branches or pull requests

1 participant