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 bug: Columns dislocation in the 'emar' table. #1779

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

Scott1743
Copy link
Contributor

@Scott1743 Scott1743 commented Aug 13, 2024

Columns dislocation due to duplicate column names when importing the 'emar' table with Mysql. so update the load.sql.

Columns dislocation due to duplicate column names when importing the 'emar' table. so update the load.sql.
@Scott1743 Scott1743 closed this Aug 13, 2024
@Scott1743 Scott1743 reopened this Aug 13, 2024
@Scott1743
Copy link
Contributor Author

When importing data with MySql, I got this following error data:
image

@alistairewj
Copy link
Member

Hmm is the provider ID in the raw data you tried to load?

@Scott1743
Copy link
Contributor Author

Scott1743 commented Aug 14, 2024

Emm... I mean these columns of data are out of place.
image
When I looked at the source code, I realized that this line of code might be written incorrectly
image
@alistairewj

@alistairewj
Copy link
Member

Yes I agree! What's missing is the enter_provider_id, the column just before the first shift. This column was added in v2.2, and should look like a string of the format P[A-Z0-9]+ (a P followed by 4-6 alphanumeric characters). Is it in the raw CSV you tried to load? Are you trying to load an earlier version with the existing scripts, or do the existing scripts need to be updated for v2.2? Not sure when we last updated the mysql scripts.

@Scott1743
Copy link
Contributor Author

The existing MySQL script needs to be updated, but after I deleted the duplicate field and imported it, the Emar table looks good.
image

@alistairewj
Copy link
Member

alistairewj commented Aug 26, 2024

Ah got it thanks. I was a bit confused because your initial screenshot doesn't have the provider ID column, so I wasn't sure if you were using the latest version of the data. But obviously there should only be one entry for enter_provider_id! Interesting that the MySQL CI build hasn't been failing... I suppose the rows load but the columns are mismatched.

@alistairewj alistairewj merged commit ce1290c into MIT-LCP:main Aug 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants