You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace `YOURUSERNAME` with your physionet username.
36
31
37
-
This will make you `mimic_data_dir` be `mimiciii/1.4`.
38
-
39
32
The rest of these intructions assume the CSV files are in the folder structure as follows:
40
33
41
34
```
@@ -45,7 +38,7 @@ mimic_data_dir/
45
38
...
46
39
```
47
40
48
-
The CSV files can be uncompressed (end in `.csv`) or compressed (end in `.csv.gz`).
41
+
By default, the above `wget` downloads the data into `mimiciii/1.4` (as we used `--cut-dirs=1` to remove the base folder). Thus, by default, `mimic_data_dir` is `mimiciii/1.4` (relative to the current folder). The CSV files can be uncompressed (end in `.csv`) or compressed (end in `.csv.gz`).
49
42
50
43
51
44
## Shell script method (`import_duckdb.sh`)
@@ -74,7 +67,7 @@ e.g. `/usr/local/bin`.
74
67
75
68
### Create DuckDB database and load data
76
69
77
-
You can do all of this will one shell script, `import_duckdb.sh`,
70
+
You can do all of this with one shell script, `import_duckdb.sh`,
78
71
located in this repository.
79
72
80
73
See the help for it below:
@@ -105,66 +98,7 @@ The script will print out progress as it goes.
105
98
Be patient, this can take minutes to hours to load
106
99
depending on your computer's configuration.
107
100
108
-
## Python script method (`import_duckdb.py`)
109
-
110
-
This method does not require the DuckDB executable, it only requires the DuckDB Python
111
-
module and the [SQLGlot](https://github.com/tobymao/sqlglot) Python module, both of which can be
112
-
easily installed with `pip`.
113
-
114
-
### Install dependencies
115
-
116
-
Install the dependencies by using the included `requirements.txt` file:
117
-
118
-
```sh
119
-
python3 -m pip install -r ./requirements.txt
120
-
```
121
-
122
-
### Create DuckDB database and load data
123
-
124
-
Create the MIMIC-III database with `import_duckdb.py` like so:
There are a few additional options for special situations:
161
-
162
-
| Option | Description
163
-
| - | -
164
-
| `--skip-indexes` | Don't create additional indexes when creating tables and loading data. This may be useful in memory-constrained systems or to save a little time.
165
-
| `--mimic-code-root [path]` | This argument specifies the location of the mimic-code repository files. This is needed to find the concepts SQL files. This is useful if you are running the script from a different directory than the one where this README.md file is located (the default is `../../../`)
166
-
| `--schema-name [name]` | This puts the tables and concepts views into a named schema in the database. This is mainly useful to mirror the behavior of the PostgreSQL version of the database, which places objects in a schema named `mimiciii` by default--if you have existing code designed for the PostgreSQL version, this may make migration easier. Note that--like the PostgreSQL version--the `ccs_dx` view is *not* placed in the specified schema, but in the default schema (which is `main` in DuckDB, not `public` as in PostgreSQL).
167
101
168
102
# Help
169
103
170
-
Please see the [issues page](https://github.com/MIT-LCP/mimic-iii/issues) to discuss other issues you may be having.
104
+
Please see the [issues page](https://github.com/MIT-LCP/mimic-code/issues) to discuss other issues you may be having.
Copy file name to clipboardExpand all lines: mimic-iv/concepts_duckdb/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This folder has SQL compatible with [DuckDB](https://duckdb.org/).
4
4
These concepts were generated automatically from the BigQuery SQL dialect using the [sqlglot](https://sqlglot.com/) package.
5
-
If you would like to contribute a correction, it should be for the corresponding file in the concepts folder.
5
+
If you would like to contribute a correction, do not make it here. Instead, make your correction in the [concepts folder](/mimic-iv/concepts/) using the BigQuery SQL syntax.
6
6
7
7
See the [README](/mimic-iv/README.md) in the parent folder for more information.
0 commit comments