Skip to content

Commit

Permalink
Merge pull request #10 from smart-on-fhir/mg/umls_descriptions
Browse files Browse the repository at this point in the history
Added static description tables
  • Loading branch information
dogversioning authored Aug 30, 2024
2 parents dd7b4d9 + dbd122d commit 2774455
Show file tree
Hide file tree
Showing 16 changed files with 2,318 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
downloads/
generated_parquet/

*.parquet
# project specific
downloads/
generated_parquet/
output.sql
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions .sqlfluffignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cumulus_library_umls/reference_sql
Binary file added cumulus_library_umls/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ study_prefix = "umls"

[table_builder_config]
file_names = [
"umls_builder.py"
"umls_builder.py",
"static_builder.py"
]

[advanced_options]
Expand Down
69 changes: 69 additions & 0 deletions cumulus_library_umls/reference_sql/static_builder.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
-- noqa: disable=all
-- This sql was autogenerated as a reference example using the library
-- CLI. Its format is tied to the specific database it was run against,
-- and it may not be correct for all databases. Use the CLI's build
-- option to derive the best SQL for your dataset.

-- ###########################################################

CREATE EXTERNAL TABLE IF NOT EXISTS `umls`.`umls__semantic_types` (
abbrev STRING,
TUI STRING,
full_type_name STRING
)
STORED AS PARQUET
LOCATION 's3://bucket/db_path/umls/SemanticTypes_2018AB'
tblproperties ("parquet.compression"="SNAPPY");

-- ###########################################################

CREATE EXTERNAL TABLE IF NOT EXISTS `umls`.`umls__semantic_groups` (
abbrev STRING,
group_name STRING,
TUI STRING,
full_type_name STRING
)
STORED AS PARQUET
LOCATION 's3://bucket/db_path/umls/SemGroups_2018'
tblproperties ("parquet.compression"="SNAPPY");

-- ###########################################################

CREATE EXTERNAL TABLE IF NOT EXISTS `umls`.`umls__rel_description` (
REL STRING,
REL_STR STRING
)
STORED AS PARQUET
LOCATION 's3://bucket/db_path/umls_rel'
tblproperties ("parquet.compression"="SNAPPY");

-- ###########################################################

CREATE EXTERNAL TABLE IF NOT EXISTS `umls`.`umls__rela_description` (
RELA STRING,
RELA_STR STRING
)
STORED AS PARQUET
LOCATION 's3://bucket/db_path/umls_rela'
tblproperties ("parquet.compression"="SNAPPY");

-- ###########################################################

CREATE EXTERNAL TABLE IF NOT EXISTS `umls`.`umls__tty_description` (
TTY STRING,
TTY_STR STRING
)
STORED AS PARQUET
LOCATION 's3://bucket/db_path/umls_tty'
tblproperties ("parquet.compression"="SNAPPY");

-- ###########################################################

CREATE EXTERNAL TABLE IF NOT EXISTS `umls`.`umls__tui_description` (
STY STRING,
TUI STRING,
TUI_STR STRING
)
STORED AS PARQUET
LOCATION 's3://bucket/db_path/umls_tui'
tblproperties ("parquet.compression"="SNAPPY");
Loading

0 comments on commit 2774455

Please sign in to comment.