Skip to content

[challenge 05] SQL schema incompatible with databricks workbook #25

@nmiodice

Description

@nmiodice

The databricks notebook will fail out of the box because the insert statement in Cmd 13 is not compatible with the SQL Schema.

There should be a fix to the databricks workbook or the SQL schema. The insert that fails is the following:

INSERT INTO jdbcObservationTable
SELECT id AS observationid, SUBSTRING_INDEX(subject.reference,'/',-1) AS patientid, code.coding[0].code AS observationcode, code.coding[0].display AS observation, status, valueQuantity.unit, valueQuantity.value FROM observationTable;

A simple workaround is to insert dummy data to the missing columns:

INSERT INTO jdbcObservationTable
SELECT id AS observationid, SUBSTRING_INDEX(subject.reference,'/',-1) AS patientid, code.coding[0].code AS observationcode, '' AS deviceid, code.coding[0].display AS observation, '', '', status, valueQuantity.unit, valueQuantity.value FROM observationTable;

A better workaround is to fix the SQL schema, or insert the correct data in the databricks workbook.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions