Skip to content

Commit

Permalink
Merge pull request #336 from coussens/main
Browse files Browse the repository at this point in the history
Fix FDA UNII loading
  • Loading branch information
jrlegrand authored Jan 13, 2025
2 parents 3d609ce + 78f2644 commit f8527a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions airflow/dags/fda_unii/load_unii.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ CREATE TABLE sagerx_lake.fda_unii (
rxcui TEXT,
pubchem TEXT,
epa_comptox TEXT,
smsid TEXT,
catalogue_of_life TEXT,
itis TEXT,
ncbi TEXT,
plants TEXT,
powo TEXT,
grin TEXT,
mpns TEXT,
inn_id TEXT,
Expand Down
2 changes: 1 addition & 1 deletion dbt/sagerx/macros/ndc_format.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
WHEN {{ndc}} ~ '^\d{5}-\d{4}-\d{2}$' THEN '5-4-2'
WHEN {{ndc}} ~ '^\d{5}-\d{5}$' THEN '5-5'
WHEN {{ndc}} ~ '^\d{4}-\d{6}$' THEN '4-6'
ELSE 'Unkown'
ELSE 'Unknown'
END
{% endset %}
{{ndc_format}}
Expand Down

0 comments on commit f8527a0

Please sign in to comment.