Closed camara-raf closed 2 years ago
Hi @camara-raf ,
Thank you very much for opening this issue (it is indeed a bug) and for the suggested fix.
The lambda should probably be moved to a proper function as it has become a bit complex.
So I have created PR #51 which moves the lambda to a function and adds a case for None
.
Can you check if PR #51 fixes your issue?
Hi @skejserjensen . Thank you for addressing this issue so quickly. Yes, PR #51 fixes my issue and the function is even better than the replace() method. Best Regards.
Thank you for testing that the fix works @camara-raf, I will merge the PR and close the issue.
Hi,
I'm trying to optimize a batch load using the multirow, and unfortunately the None values are converted to a string 'None' instead of 'NULL'. As this isn't any character on a string that needs to be sanitized, there is no method to address it from outside.
file:tables.py class: BatchFactTable parameter: usemultirow = True
current code can add single quotes to string values. Values that are not string, are converted to string without any special treatment to None: line:1872
A suggestion would be to replace the value None with NULL when converting the value to string: