The tables property is still having difficulties finding the tables in a CTAS
See original GitHub issueI created the following test:
def test_create_table_as_select_with_joins_with():
qry = """
CREATE table xyz as
with sub as (select it_id from internal_table)
SELECT *
from table_a
join table_b on (table_a.name = table_b.name)
left join table_c on (table_a.age = table_c.age)
left join sub on (table.it_id = sub.it_id)
order by table_a.name, table_a.age
"""
parser = Parser(qry)
assert set(parser.tables) == set(["xyz", "table_a", "table_b", "table_c", "internal_table"])
And the code is not able to pass it as is. It seems that it struggles with with
created subqueries.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Considerations and limitations for CTAS queries
Table, database, or column names for CTAS queries should not contain quotes or backticks. To ensure this, check that your table, database, or...
Read more >CREATE TABLE AS SELECT (CTAS) - Azure Synapse Analytics
CTAS is a parallel operation that creates a new table based on the output of a SELECT statement. CTAS is the simplest and...
Read more >Derived tables in Looker - Google Cloud
In Looker, a derived table is a query whose results are used as if it were an actual table in the database. For...
Read more >CREATE TABLE AS SELECT does not work for external tables
Sounds like CTAS does not work with external tables. Any reasons why this should not be supported? We can contribute a patch if...
Read more >Unable to create table from within package - Stack Overflow
Create a table in procedure is only alowed when you have "Create table" or "create any table" privilege but granted directly to user ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am using AWS Athena, which is essentially Presto
We should state that in our
CONTRIBUTING.md
😉