admin管理员组文章数量:1134247
I came from traditional database development and currently working with databricks. In SQL Server, I can right click to the table or functions then generate the SQL scripts that created these objects for reference. However, I do not see the same functionality when working in the databricks workspace. I know that I can check the table/functions details in the Unity Catalog but it still required me to type in the syntax, parameter details for the SQL script.
Is there any way to automatically generate the SQL scripts that created SQL UDF or delta lake table in databricks workspace?
I came from traditional database development and currently working with databricks. In SQL Server, I can right click to the table or functions then generate the SQL scripts that created these objects for reference. However, I do not see the same functionality when working in the databricks workspace. I know that I can check the table/functions details in the Unity Catalog but it still required me to type in the syntax, parameter details for the SQL script.
Is there any way to automatically generate the SQL scripts that created SQL UDF or delta lake table in databricks workspace?
Share Improve this question edited Jan 8 at 5:28 Dale K 27.1k15 gold badges55 silver badges82 bronze badges asked Jan 8 at 4:39 Ken MastersKen Masters 2811 gold badge8 silver badges19 bronze badges 3- what you tried so far add those details and any error you facing? – JayashankarGS Commented Jan 8 at 5:12
- 2 For tables you can use the SHOW CREATE TABLE <table_name> command. – Anupam Chand Commented Jan 8 at 6:57
- Okay, I can get the SQL script with SHOW CREATE TABLE for table creation. However, it seems like SHOW CREATE FUNCTION does not work in this case – Ken Masters Commented Jan 8 at 16:45
1 Answer
Reset to default 1You can use the below command to check the create statement -
show create table databasename.tablename
To check the table columns and its datatypes -
describe databasename.tablename
本文标签:
版权声明:本文标题:apache spark sql - How can I generate the SQL scripts that created SQL UDF or delta lake table in databricks? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736759488a1951470.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论