You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Georg Tsakumagos (JIRA)" <ji...@apache.org> on 2012/07/30 12:01:35 UTC

[jira] [Created] (CSV-93) Allow the handling of NULL values

Georg Tsakumagos created CSV-93:
-----------------------------------

             Summary: Allow the handling of NULL values
                 Key: CSV-93
                 URL: https://issues.apache.org/jira/browse/CSV-93
             Project: Commons CSV
          Issue Type: Improvement
          Components: Documentation, Parser, Printer
    Affects Versions: 1.0
            Reporter: Georg Tsakumagos


h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Modifications
See derived patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Georg Tsakumagos updated CSV-93:
--------------------------------

    Description: 
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See attached patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |


  was:
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See derived patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |


    
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425019#comment-13425019 ] 

Georg Tsakumagos commented on CSV-93:
-------------------------------------

I think it is not a problem because the attached patch activate this behavior only if the *new* CSVFormat option *WithNullObjectPatternEnabled* is set.
The handling of null values is a special treatment which must be activated. 
It is not activated by default. 

Please review the patch and judge it again. 
                
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425589#comment-13425589 ] 

Georg Tsakumagos commented on CSV-93:
-------------------------------------

Here are the results of research. 
                
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |
> h5. NULL in DBMS proprietary CSV formats
> || Product || Strategy || Doku / Link ||
> | PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html] |
> | MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
> | MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
> | Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm] |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Georg Tsakumagos updated CSV-93:
--------------------------------

    Description: 
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See attached patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |

h5. NULL in DBMS proprietary CSV formats

|| Product || Strategy || Doku / Link ||
| PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html]
| MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
| MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
| Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm]

  was:
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See attached patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |

h5. NULL in DBMS proprietary CSV formats

|| Product || Strategy || Doku / Link ||
| PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html]
| MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
| MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
| Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm]


    
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |
> h5. NULL in DBMS proprietary CSV formats
> || Product || Strategy || Doku / Link ||
> | PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html]
> | MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
> | MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
> | Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Georg Tsakumagos updated CSV-93:
--------------------------------

    Description: 
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See attached patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |

h5. NULL in DBMS proprietary CSV formats

|| Product || Strategy || Doku / Link ||
| PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html]
| MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
| MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
| Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm]


  was:
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See attached patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |


    
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |
> h5. NULL in DBMS proprietary CSV formats
> || Product || Strategy || Doku / Link ||
> | PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html]
> | MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
> | MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
> | Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425019#comment-13425019 ] 

Georg Tsakumagos edited comment on CSV-93 at 7/30/12 5:18 PM:
--------------------------------------------------------------

I think it is not a problem because the attached patch activate this behavior only if the *new* CSVFormat option *WithNullObjectPatternEnabled* is set.
The handling of null values is a special treatment which must be activated. 
It is not activated by default. 

Please review the attached patch and judge it again. 
                
      was (Author: geo):
    I think it is not a problem because the attached patch activate this behavior only if the *new* CSVFormat option *WithNullObjectPatternEnabled* is set.
The handling of null values is a special treatment which must be activated. 
It is not activated by default. 

Please review the patch and judge it again. 
                  
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Georg Tsakumagos updated CSV-93:
--------------------------------

    Description: 
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See attached patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |

h5. NULL in DBMS proprietary CSV formats

|| Product || Strategy || Doku / Link ||
| PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html] |
| MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
| MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
| Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm] |

  was:
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See attached patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |

h5. NULL in DBMS proprietary CSV formats

|| Product || Strategy || Doku / Link ||
| PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html]
| MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
| MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
| Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm]

    
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |
> h5. NULL in DBMS proprietary CSV formats
> || Product || Strategy || Doku / Link ||
> | PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html] |
> | MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
> | MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
> | Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm] |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Georg Tsakumagos updated CSV-93:
--------------------------------

    Attachment: patch.txt
    
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Modifications
> See derived patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Georg Tsakumagos updated CSV-93:
--------------------------------

    Description: 
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See attached patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |

h5. NULL in DBMS proprietary CSV formats

|| Product || Strategy || Documentation / Link ||
| PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html] |
| MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
| MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
| Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm] |

  was:
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See attached patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |

h5. NULL in DBMS proprietary CSV formats

|| Product || Strategy || Doku / Link ||
| PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html] |
| MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
| MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
| Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm] |

    
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |
> h5. NULL in DBMS proprietary CSV formats
> || Product || Strategy || Documentation / Link ||
> | PostgreSQL | If NULL should be preserved all non NULL values gets quoted | [PostgreSQL 8.1 Manual|http://www.postgresql.org/docs/8.1/static/sql-copy.html] |
> | MySQL | NULL Values will be replaced by the letters NULL or escaped by \n | not found, verified with MySQL Workbench | 
> | MS SQL | NULL values will be exported as empty strings (no quotes). Strings will be quoted if needed. Import can interpret them as null | [MSDN|http://msdn.microsoft.com/en-us//library/ms187887] | 
> | Oracle | NULL Values will be replaced by the letters NULL | [Manual|http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/impexp.htm] |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CSV-93) Allow the handling of NULL values

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424912#comment-13424912 ] 

Sebb commented on CSV-93:
-------------------------

The problem is, this may clash with situations where textual data does not have to be quoted.

I agree it would be useful to be able to represent null; however it needs to be done in a way that is unambiguous. This may require adding an option, e.g. to force text to be quoted.
                
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CSV-93) Allow the handling of NULL values

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425333#comment-13425333 ] 

Sebb commented on CSV-93:
-------------------------

Sorry, I misread the issue.

However, I'm still not sure that's the best (or complete) solution.
Do you have any examples of existing applications that generate CSV data which include nulls?
For example, how do SQL database utilities handle nulls?
                
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See attached patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CSV-93) Allow the handling of NULL values

Posted by "Georg Tsakumagos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CSV-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Georg Tsakumagos updated CSV-93:
--------------------------------

    Description: 
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Configuration
To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.

h5. Modifications
See derived patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |


  was:
h5. Requirement
To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 

h5. Specification
To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value

h5. Modifications
See derived patch.

h5. Example
This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.

|| Array-Data || CSV-Data ||
| \{null,"","A"," "\}; |,"A",""," " |
| \{"",null,"A"," "\} |"",,"A"," " |
| \{"","A",null\} |"","A", |


    
> Allow the handling of NULL values
> ---------------------------------
>
>                 Key: CSV-93
>                 URL: https://issues.apache.org/jira/browse/CSV-93
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Documentation, Parser, Printer
>    Affects Versions: 1.0
>            Reporter: Georg Tsakumagos
>         Attachments: patch.txt
>
>
> h5. Requirement
> To use the CSV parser and printer for SQL Dumps it would be nice if they could handle *null* values. 
> h5. Specification
> To distinguish between an *empty* or *null* value empty values always gets quoted to denote an empty string. The absence of an quote denotes a *null* value
> h5. Configuration
> To activate the behavior call the method _withNullObjectPatternEnabled_ of the _CSVFormat_ with parameter _true_.
> h5. Modifications
> See derived patch.
> h5. Example
> This example using as base the _DEFAULT_ _CSVFormat_ modified by the NullObjectPattern behavior.
> || Array-Data || CSV-Data ||
> | \{null,"","A"," "\}; |,"A",""," " |
> | \{"",null,"A"," "\} |"",,"A"," " |
> | \{"","A",null\} |"","A", |

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira