Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#165): removing potentially ambiguous date format #170

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

witash
Copy link
Contributor

@witash witash commented Sep 24, 2024

the previous commit failed because it recognized '10/15/1998' as a valid date format, but then tried to interpret it as 'DD/MM/YYYY' which failed because month can't be 15.

In the original issue, I said it should be a permissive as possible, but now I think it should default to null if there's any possiblity for ambiguity, so only support YYYY-MM-DD and default anything else to NULL

This condition still isn't perfect, because there's a possibility for errors when something is formatted like 1234-56-78 but is not a valid date, but Im not sure if there's a better way...if that case every actually happened, it might be necessarry to fix the data rather than trying to address everything in the case statement.

The other option could be to check for valid dates in the case condition...which would get messy, and we would want to move it to a dbt macro.

so this could be a quick fix to the current problem.
We also need to do something similar for patient_f_client (I don't have access to that repo)

@witash
Copy link
Contributor Author

witash commented Sep 24, 2024

closes #165

created a new PR because the old one was already merged

@witash witash requested a review from njuguna-n September 24, 2024 11:21
@witash witash merged commit 26f4da7 into main Sep 24, 2024
4 checks passed
@witash witash deleted the 165-unsupported-date-format branch September 24, 2024 12:55
@medic-ci
Copy link

🎉 This PR is included in version 1.2.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants