You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/04/23 00:55:13 UTC

[jira] [Commented] (METAMODEL-244) Ability to specify column names for datastores that may not have named columns

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

ASF GitHub Bot commented on METAMODEL-244:
------------------------------------------

GitHub user kaspersorensen opened a pull request:

    https://github.com/apache/metamodel/pull/96

    (draft) METAMODEL-244

    I wanted to give a shot at fixing METAMODEL-244 so here goes.
    
    I made available a strategy interface for column naming, which I implemented in a few different ways, and created a default delegating strategy as well. It's implemented in the 'fixedwidth' module only for now.
    
    I also managed to fix something which I've encountered a few times before, but newer got around to report as an issue: The fact that it is annoying that you sometimes get duplicated column names for CSV files and such. That should rarely be allowed, so I implemented a strategy for renaming those duplicated column names automatically.
    
    I'd like a review if anyone is willing. If you agree that the approach taken is good I will happily also apply it in the excel and csv module. It would be quite easy I think actually.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kaspersorensen/metamodel METAMODEL-244

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metamodel/pull/96.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #96
    
----
commit 3d0666cabce5e6df40ec341bb1d21b74343d1e3f
Author: kaspersorensen <i....@gmail.com>
Date:   2016-04-22T21:54:22Z

    METAMODEL-244: Made ColumnNamingStrategy available to fixedwidth module

commit 0da8f1a1cb9fa8bfe87eb73f38df047d111e196d
Author: kaspersorensen <i....@gmail.com>
Date:   2016-04-22T22:50:06Z

    METAMODEL-244: Refactored fixedwidth module a bit and added strategies

----


> Ability to specify column names for datastores that may not have named columns
> ------------------------------------------------------------------------------
>
>                 Key: METAMODEL-244
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-244
>             Project: Apache MetaModel
>          Issue Type: New Feature
>            Reporter: Kasper Sørensen
>            Assignee: Kasper Sørensen
>
> Some datastores don't necesarily define the column names/headers, just the data. Therefore it is sometimes needed to define column names manually - or even via some pluggable interface that would allow a custom naming strategy.
> I can think of the following modules where this would be relevant:
>  * csv
>  * fixed-width
>  * excel



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