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

Show create table statement is not working for delta lake tables #1038

Closed
Sharan441 opened this issue Mar 29, 2022 · 2 comments
Closed

Show create table statement is not working for delta lake tables #1038

Sharan441 opened this issue Mar 29, 2022 · 2 comments

Comments

@Sharan441
Copy link

Greetings,

We have a mix of parquet tables and delta tables. we have observed that "Show create table $table_name" is not working for delta tables.
We have a process to replicate all the table schemas to another environment and this is failing for delta tables with below error:

Is there any workaround to extract the create table statements for delta tables?

Error: SHOW CREATE TABLE is not supported for v2 tables.
org.apache.spark.sql.execution.datasources.v2.DataSourceV2Strategy.apply(DataSourceV2Strategy.scala:350)
org.apache.spark.sql.catalyst.planning.QueryPlanner.$anonfun$plan$1(QueryPlanner.scala:63)
scala.collection.Iterator$$anon$11.nextCur(Iterator.scala:484)
scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:490)
scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:489)
org.apache.spark.sql.catalyst.planning.QueryPlanner.plan(QueryPlanner.scala:93)
org.apache.spark.sql.execution.SparkStrategies.plan(SparkStrategies.scala:68)
org.apache.spark.sql.catalyst.planning.QueryPlanner.$anonfun$plan$3(QueryPlanner.scala:78)
scala.collection.TraversableOnce.$anonfun$foldLeft$1(TraversableOnce.scala:162)
scala.collection.TraversableOnce.$anonfun$foldLeft$1$adapted(TraversableOnce.scala:162)

@zsxwing
Copy link
Member

zsxwing commented Apr 4, 2022

Closing this as a duplicate of #1032. It would be great if you can post your comment in that ticket.

@zsxwing zsxwing closed this as completed Apr 4, 2022
@ricargutier
Copy link

ricargutier commented Sep 9, 2023

Hi there,

I'm trying to patch my system with this solution but I don't know how to. Anybody can help me?. Thanls in advance

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

3 participants