Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 01:08 PM
Hi @pshuk , Greetings!
We understand that you are looking for a CLI command to create a Table but at this moment Databricks doesn't support CLI command to create the table but you can use SQL Execution API -https://docs.databricks.com/api/workspace/statementexecution/executestatement to run the DDL statements against a SQL warehouse, here is an example:
POST https://<DATABRICKS INSTANCE>/api/2.0/sql/statements
Body - {
"warehouse_id": "warehouse-ID",
"statement": "CREATE TABLE <Catalog Name><Schema Name><Table Name>"
}
Authorisation - < PAT Token >
Note - While executing this API, the SQL warehouse should be in a running state or else the cmd will go into a PENDING state.
Please let me know if this helps and leave a like if you find this information useful. Follow-ups are appreciated.
Kudos
Ayushi