Skip to content

Commit

Permalink
add instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
hwang-db committed Jun 22, 2022
1 parent b449662 commit 356a669
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adb-external-hive-metastore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ Now you can config all other clusters to use this external metastore, using the

### Notes: Migrate from your existing managed metastore to external metastore

Refer to tutorial: https://kb.databricks.com/metastore/create-table-ddl-for-metastore.html

```python
dbs = spark.catalog.listDatabases()
for db in dbs:
f = open("your_file_name_{}.ddl".format(db.name), "w")
Expand All @@ -50,7 +52,7 @@ for db in dbs:
f.write(DDL.first()[0])
f.write("\n")
f.close()
```


<!-- BEGIN_TF_DOCS -->
Expand Down

0 comments on commit 356a669

Please sign in to comment.