Open amygdala opened 2 years ago
Even with the above changes, I'm not sure that the substitutions are working, however-- I see this output from that setup cell:
custom %%bigquery magic substitutions:
{admissions_table} → physionet-data.mimiciii_clinical.admissions
{d_icd_diagnoses_table} → physionet-data.mimiciii_clinical.d_icd_diagnoses
{diagnoses_icd_table} → physionet-data.mimiciii_clinical.diagnoses_icd
{patients_table} → physionet-data.mimiciii_clinical.patients
but running a cell like this:
%%bigquery
SELECT
COUNT(*) as total,
SUM(HOSPITAL_EXPIRE_FLAG) as died
FROM
`{admissions_table}`
gives this error:
ERROR:
400 Table "{admissions_table}" must be qualified with a dataset (e.g. dataset.table).
In this notebook: https://github.com/GoogleCloudPlatform/healthcare/blob/master/datathon/mimic_eicu/tutorials/BigQuery_ML.ipynb
I believe that this snippet:
needs to be modified in 2 ways:
bigquery.magics._run_query
-->bigquery.magics.magics._run_query
In py3 (which I'm assuming everyone is using now),
func_name
-->__name__