Skip to content

Commit

Permalink
Added static description tables
Browse files Browse the repository at this point in the history
  • Loading branch information
dogversioning committed Aug 30, 2024
1 parent dd7b4d9 commit 672b024
Show file tree
Hide file tree
Showing 16 changed files with 2,316 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
downloads/
generated_parquet/

*.parquet
# project specific
downloads/
generated_parquet/
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 672b024

Please sign in to comment.