Skip to content

Instantly share code, notes, and snippets.

@mjfrigaard
Last active September 17, 2018 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjfrigaard/5b6a217aac3aba95e262f19f6ec02371 to your computer and use it in GitHub Desktop.
Save mjfrigaard/5b6a217aac3aba95e262f19f6ec02371 to your computer and use it in GitHub Desktop.

Issue in MySQL dump

The mysql dump used to create the RDB_database did not load all the tables from RDB_shared.

From Boris

I am not sure I understand what problem you have.

As you can see, all 17 Dana’s tables are present in the dump file:

$ cat proj_emrUCSF2018Mar.sql | grep "CREATE TABLE"
CREATE TABLE `ALLERGIES` (
CREATE TABLE `BILLING` (
CREATE TABLE `COVERAGE` (
CREATE TABLE `DEPARTMENTS` (
CREATE TABLE `DIAGNOSES` (
CREATE TABLE `ENCOUNTERS` (
CREATE TABLE `EXTRACT_DATE` (
CREATE TABLE `FLOWSHEETROWDIM` (
CREATE TABLE `FLOWSHEETVALUEFACT` (
CREATE TABLE `IMMUNIZATIONS` (
CREATE TABLE `LAB` (
CREATE TABLE `MEDICATION_ORDERS` (
CREATE TABLE `PATIENTS` (
CREATE TABLE `PATIENT_RACE` (
CREATE TABLE `PROCEDURE_ORDERS` (
CREATE TABLE `PROVIDERS` (
CREATE TABLE `VITALS` (
$

But when I run the same grep command on MATE desktop:

mfrigaard@MPROJECT:~$ pwd
/home/mfrigaard
mfrigaard@MPROJECT:~$ cd /mnt/data
mfrigaard@MPROJECT:/mnt/data$ ls
ALLERGIES.txt     FLOWSHEETROWDIM.txt     PATIENT_RACE.txt
BILLING.txt       FLOWSHEETVALUEFACT.txt  PATIENTS.csv
code              IMMUNIZATIONS.csv       PATIENTS.txt
COVERAGE.txt      IMMUNIZATIONS.txt       PROCEDURE_ORDERS.txt
DEPARTMENTS.txt   LAB.txt                 proj_emrUCSF2018Aug.sql
DIAGNOSES.txt     lost+found              PROVIDERS.txt
ENCOUNTERS.txt    MEDICATION_ORDERS.txt   VITALS.txt
EXTRACT_DATE.txt  mysql
mfrigaard@MPROJECT:/mnt/data$ ls mysql
ls: cannot open directory 'mysql': Permission denied
mfrigaard@MPROJECT:/mnt/data$ cat proj_emrUCSF2018Aug.sql | grep "CREATE TABLE"
CREATE TABLE `ALLERGIES` (
CREATE TABLE `BILLING` (
CREATE TABLE `COVERAGE` (
CREATE TABLE `DEPARTMENTS` (
CREATE TABLE `DIAGNOSES` (
CREATE TABLE `ENCOUNTERS` (
CREATE TABLE `EXTRACT_DATE` (
CREATE TABLE `FLOWSHEETROWDIM` (
CREATE TABLE `FLOWSHEETVALUEFACT` (
CREATE TABLE `IMMUNIZATIONS` (
CREATE TABLE `LAB` (
CREATE TABLE `MEDICATION_ORDERS` (
CREATE TABLE `PATIENTS` (
CREATE TABLE `PATIENT_RACE` (
CREATE TABLE `PROCEDURE_ORDERS` (
...

I only see these two tables (then terminal stalls out...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment