Static data - newline character
petrv
Posts: 2 New member
Hi,
I am evaluating deployment suite for Oracle. After 10 minutes of playing with source control I am happy about the speed but I encountered an Error and now the project is broken for me (error reported).
Error: Failed to compare Static data: HeadToWorking: OCI-22062 invalid input string [WHERE RQT_ID=385075]
Looking at the generated .csv file I can see the what's causing the problem (most probably)
"9","30","Project initiatives","Project initiatives",null,"APPL_INTREQUESTS.INTREQUESTS_WEB_API.REQUEST_LIST_URL(385075)","15","lightbulb","SELECT COUNT(*) FROM APPL_INTREQUESTS.WOR_WOS_REQ_WAITING_VIEW
WHERE RQT_ID=385075
This shall be one line, but the data in one of the columns contains a newline character (before WHERE RQT_ID ...).
Am I missing some configuration parameter, have I approached the static data wrong or your product cannot simply support data with newline characters because of CSV file format limitations?
I am evaluating deployment suite for Oracle. After 10 minutes of playing with source control I am happy about the speed but I encountered an Error and now the project is broken for me (error reported).
Error: Failed to compare Static data: HeadToWorking: OCI-22062 invalid input string [WHERE RQT_ID=385075]
Looking at the generated .csv file I can see the what's causing the problem (most probably)
"9","30","Project initiatives","Project initiatives",null,"APPL_INTREQUESTS.INTREQUESTS_WEB_API.REQUEST_LIST_URL(385075)","15","lightbulb","SELECT COUNT(*) FROM APPL_INTREQUESTS.WOR_WOS_REQ_WAITING_VIEW
WHERE RQT_ID=385075
This shall be one line, but the data in one of the columns contains a newline character (before WHERE RQT_ID ...).
Am I missing some configuration parameter, have I approached the static data wrong or your product cannot simply support data with newline characters because of CSV file format limitations?
Tagged:
Best Answer
-
Alex B Posts: 1,158 Diamond 4Hi @petrv,
The issue is going to be that the newline is a Carriage return / Line Feed (CR/LF) rather than just an LF. In these cases, Source Control for Oracle can't distinguish the end-of-line character of a single record from the end of the line in a multi line field.
What source control system are you using? If you are using Git, this may be related to a setting for how the end-of-line character is treated by the Git repository. We have seen in some cases that the file in the repository is set with LF characters in the multiline field, but it is returned with CRLF due to a setting in Git. If this seems like the case I can provide more information on the setting.
Otherwise, you will need to ensure that the newline character for multi-line strings is only a LF where the end of line for a single record is still CRLF.
Kind regards,
Alex
Answers
we are using Git and after setting * text=auto in .gitattributes everything seems to work fine. (Your source control tool changes the DBs CRLF to LF and uses CRLF as record separators).
Awesome, thanks!
The only issue I have now is that the newlines are not registered as change so cannot be checked in. Actually, it seems that no whitespace (even in the middle of a string cointained in a field) change is registered. We can work around that, but is that expected?
For the whitespace issue, this will likely be because the ignore whitespace is a default option. You can disable this in the UI by editing the comparison options on the Options tab removing the check from this, or on the command line by specifying the /ignore: option and not including the "w" (see this page for more information on this https://documentation.red-gate.com/sco/using-the-command-line/command-line-switches#Commandlineswitches-/ignore:<value>).
I hope this helps!
Kind regards,
Alex
Have you visited our Help Center?