BERDL Data Lakehouse Query Skill
Query the KBase BERDL Data Lakehouse containing pangenome and biochemistry data.
Step 0: Environment Check
Run before anything else:
python scripts/berdl_env.py --check
If it exits non-zero, follow the printed next steps exactly. Do not proceed with any query until this passes. The location reported (on-cluster vs off-cluster) selects the execution path for every subsequent step.
Discovery (live)
Run the canonical discovery flow before any query. The set of accessible databases depends on the authenticated user; do not assume from prose.
import berdl_notebook_utils
databases = berdl_notebook_utils.get_databases(return_json=False) # → list[str]
tables = berdl_notebook_utils.get_tables("DATABASE", return_json=False) # → list[str]
schema = berdl_notebook_utils.get_table_schema("DATABASE", "TABLE", detailed=True, return_json=False) # → list[dict] with name, dataType, description, isPartition, ...
# For table-level COMMENT and TBLPROPERTIES:
spark.sql("DESCRIBE EXTENDED DATABASE.TABLE").toPandas()
Discovery returns JSON by default. Always pass
return_json=False. Without it you get a JSON string, andin, iteration, anddisplay()will silently misbehave.