[ 
https://issues.apache.org/jira/browse/DERBY-4555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15319848#comment-15319848
 ] 

Rick Hillegas commented on DERBY-4555:
--------------------------------------

Hi Danoja,

In DataDictionaryImpl, you will want to move the creation of SYSCS_IMPORT_DATA 
out of the main body of create_SYSCS_procedures() and into a new method called 
create_10_13_system_procedures(). That new method should be invoked at the end 
of create_SYSCS_procedures(). And you will want to add a call to 
create_10_13_system_procedures() to the DD_Version class. Look for references 
to create_10_12_system_procedures() for an example of how all of this is done. 
The DD_Version code handles the case of hard-upgrading to 10.13 from an older 
version of Derby like 10.12.

Note that we only want the new signature for SYSCS_IMPORT_DATA to take effect 
for newly created databases and for databases which are hard-upgraded to 10.13. 
This means that you will still need the old signature for SYSCS_IMPORT_DATA in 
SystemProcedures so that calls to that system procedure will still resolve in 
soft-upgraded databases. The old version of the procedure can call the new 
version. And you will need to test that the procedure still works properly 
after soft-upgrading to 10.13 and then downgrading back to the original 
release. These upgrade/downgrade tests should be added to Changes10_13.java.

Hope this helps,
-Rick


> Expand SYSCS_IMPORT_TABLE to accept CSV file with header lines
> --------------------------------------------------------------
>
>                 Key: DERBY-4555
>                 URL: https://issues.apache.org/jira/browse/DERBY-4555
>             Project: Derby
>          Issue Type: Improvement
>          Components: Miscellaneous
>            Reporter: Yair Lenga
>            Assignee: Danoja Dias
>         Attachments: gotException.diff, hardCoded.diff, latest.diff, 
> petlist.csv, petlist.csv, petlist.csv, repro.java
>
>
> The SYSCS_IMPORT_TABLE (and SYSCS_IMPORT_DATA) function allow import of data 
> from external resources. In general, they can process CSV files that created 
> with various tools - with one exception: the header line.
> While there is no accepted standard, most tools will include a header line in 
> the CSV file with column names. This convention is supported in Excel and 
> many other tools.
> My Request: extend the SYSCS_IMPORT_TABLe and SYSCS_IMPORT_DATA (and other 
> related procedures) to include an extra indicator for the number of header 
> lines to be ignored.
> As an extra bonus it will be help is the SYSCS_IMPORT_DATA will accept column 
> names (instead of column indexes) in the 'COLUMNINDEXES' arguments. E.g., it 
> should be possible to indicate COLUMNINDEXES of '1,3,sales,5,'. This feature 
> will make it significantly easier to handle cases where the external input 
> files is extended to include additional columns.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to