We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6351e10 commit 4b4a844Copy full SHA for 4b4a844
1 file changed
mimic-iv/tests/test_all_tables.py
@@ -0,0 +1,15 @@
1
+import pandas as pd
2
+from pandas.io import gbq
3
+
4
+def test_tables_have_data(dataset, project_id, concepts):
5
+ """Verifies each table has data."""
6
7
+ for folder, concept_list in concepts.items():
8
+ for concept_name in concept_list:
9
+ query = f"""
10
+ SELECT *
11
+ FROM {dataset}.{concept_name}
12
+ LIMIT 5
13
+ """
14
+ df = gbq.read_gbq(query, project_id=project_id, dialect="standard")
15
+ assert df.shape[0] > 0, f'did not find table for {folder}.{concept_name}'
0 commit comments