# Create database schema
spark.sql("CREATE DATABASE IF NOT EXISTS csgci")
# Create Hive Internal table
df.write.mode("overwrite").option("overwriteSchema", "true").saveAsTable("csgci.drug_ic")
# Check if the table is created
%sql
select * from drug_ic
Last active
September 25, 2023 21:32
-
-
Save dvu4/6d93add753bd125833e4eb6d0a3d8354 to your computer and use it in GitHub Desktop.
This script will create Hive metastore table in Databricks Catalog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment