Skip to content

Commit 0954b5f

Browse files
committed
remove obsolete postgres-functions
1 parent 4bca7cf commit 0954b5f

4 files changed

Lines changed: 2 additions & 334 deletions

File tree

mimic-iii/concepts_postgres/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ psql -c "CREATE SCHEMA IF NOT EXISTS mimiciii_derived;"
2020
psql -v ON_ERROR_STOP=1 -f postgres-make-concepts.sql
2121
```
2222

23-
The [postgres-functions.sql](postgres-functions.sql) file contains definitions for a few functions which exist in BigQuery but do not exist in PostgreSQL. It is no longer required by the generated concepts, but the functions are convenient if you find yourself switching back and forth between the two dialects.
23+
If you are porting your own query from BigQuery to PostgreSQL, use the transpiler rather than hand-translating it. It converts BigQuery-only constructs (`DATETIME_DIFF`, `REGEXP_EXTRACT`, `GENERATE_ARRAY`, and so on) to PostgreSQL with the same semantics used by the generated concepts — see [src/mimic_utils/sqlglot_dialects/postgres.py](/src/mimic_utils/sqlglot_dialects/postgres.py).

mimic-iii/concepts_postgres/postgres-functions.sql

Lines changed: 0 additions & 163 deletions
This file was deleted.

mimic-iv/concepts_postgres/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ To generate concepts, change to this directory and run `psql`. Then within psql,
1212

1313
... or, run the SQL files in your GUI of choice.
1414

15-
The postgres-functions.sql contains definitions for a few functions which exist in BigQuery but do not exist in PostgreSQL. It is not required but these functions are convenient if you find yourself switching back and forth between the two.
15+
If you are porting your own query from BigQuery to PostgreSQL, use the transpiler rather than hand-translating it. It converts BigQuery-only constructs (`DATETIME_DIFF`, `REGEXP_EXTRACT`, `GENERATE_ARRAY`, and so on) to PostgreSQL with the same semantics used by the concepts in this folder — see [src/mimic_utils/sqlglot_dialects/postgres.py](/src/mimic_utils/sqlglot_dialects/postgres.py).

mimic-iv/concepts_postgres/postgres-functions.sql

Lines changed: 0 additions & 169 deletions
This file was deleted.

0 commit comments

Comments
 (0)