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

DKAN-4291 add mysql empty row removal option #4292

Draft
wants to merge 2 commits into
base: 2.x
Choose a base branch
from

Conversation

swirtSJW
Copy link
Contributor

Fixes #4291

Describe your changes

QA Steps

  • Add manual QA steps in checklist format for a reviewer to perform. Be as specific as possible, provide examples if appropriate.

Checklist before requesting review

If any of these are left unchecked, please provide an explanation

  • I have updated or added tests to cover my code
  • I have updated or added documentation

@swirtSJW swirtSJW force-pushed the DKAN-4291-add-mysql-empty-rows-option branch from 58145d4 to 5e7ec8f Compare September 17, 2024 21:17
@swirtSJW swirtSJW force-pushed the DKAN-4291-add-mysql-empty-rows-option branch from 5e7ec8f to 01f1300 Compare September 17, 2024 21:45
@@ -128,7 +129,7 @@ protected function getColsFromFile(string $file_path, string $delimiter): array
$f = fopen($file_path, 'r');

// Ensure the file could be successfully opened.
if ($f === FALSE) {
if (!isset($f) || $f === FALSE) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is 2.18 cruft that snuck back in due to me working in 2.18. I will fix this and the others of similar sneakiness.

// Ensure the columns of the resource file were successfully read. $columns
// could be array, FALSE, or NULL.
if (!$columns) {
// Ensure the columns of the resource file were successfully read.
Copy link
Contributor Author

@swirtSJW swirtSJW Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.18 cruft

@swirtSJW swirtSJW self-assigned this Sep 18, 2024
@janette
Copy link
Member

janette commented Sep 18, 2024

Thanks for working on this @swirtSJW please include tests for the new code.

@dmundra
Copy link
Contributor

dmundra commented Sep 20, 2024

Thanks for working on this @swirtSJW please include tests for the new code.

@swirtSJW check out the tests modules/datastore/modules/datastore_mysql_import/tests/src/Kernel/Service/MysqlImportTest.php in like https://github.com/GetDKAN/dkan/pull/4293/files

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.

Add option for Mysql Import to support removing empty rows
3 participants