Skip to content

Instantly share code, notes, and snippets.

@HeathLoganCampbell
Created October 12, 2025 23:13
Show Gist options
  • Save HeathLoganCampbell/f050eb644b29cb73983a7d9d0f68604e to your computer and use it in GitHub Desktop.
Save HeathLoganCampbell/f050eb644b29cb73983a7d9d0f68604e to your computer and use it in GitHub Desktop.
Script to get all the tables in a lakehouse & so GPT can consume it for fabric
-- Script to get all the tables in a lakehouse & so GPT can consume it for fabric
tables = spark.sql("SHOW TABLES")
for row in tables.collect():
name = row.tableName
print(f"\n--- {name} ---")
df = spark.table(f"LAKE_HOUSE_NAME.{name}")
df.printSchema()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment