[teiid-issues] [JBoss JIRA] (TEIID-2896) Add TEXTTABLE function capabilities to interpret fixed width data file content that is shorter than the defined line length

Steven Hawkins (JIRA) issues at jboss.org
Thu Jun 5 13:30:16 EDT 2014


    [ https://issues.jboss.org/browse/TEIID-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973845#comment-12973845 ] 

Steven Hawkins commented on TEIID-2896:
---------------------------------------

To build off what you are saying, we have three scenarios:

1. standard sv or fixed width such that all rows have the same characteristics (should already be covered by designer)

2. sv file with multiple row types - here both the row selector and column selector can be used.  This functionality existed before this issue.  I'm not sure if designer had any support.  This allows the user to create denormalized rows, such as:

type,firstName,lastName
p,John,Smith
c,Sue
c,Billy
p,Mildred,Jones
c,Tobias

With the texttable:

TEXTTABLE (file SELECTOR 'c' COLUMNS firstName string, lastName string SELECTOR 'p' 3 HEADER)

Would produce:

Sue,Smith
Billy,Smith
Tobias,Jones

3. A fixed width file with multiple row types.  Because of this issue it doesn't always matter that the rows conform to a particular expected data length, or by TEIID-2898 you can selectively only parse the rows matching the row selector.

> Add TEXTTABLE function capabilities to interpret fixed width data file content that is shorter than the defined line length
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TEIID-2896
>                 URL: https://issues.jboss.org/browse/TEIID-2896
>             Project: Teiid
>          Issue Type: Enhancement
>          Components: Query Engine
>            Reporter: Van Halbert
>            Assignee: Steven Hawkins
>             Fix For: 8.7
>
>         Attachments: sample, TEIID-2896.patch
>
>
> Current behavior is that data lines too short to fit a fixed width data interpretation produces an error such as "Error: Text parse error: Fixed width line width 35 is smaller than the expected 60 on text line 1 in file:/tmp/file.csv.". The customer's use case is interpreting data files from another application which bundles multiple types of data along with additional descriptive info/metadata about the data contained within the file. As the error is thrown if any lines after the first interpreted line are shorter than the summed value of the fixed width columns, they are unable to query the file. The customer wishes for the ERROR to be suppressed and the query to return the data independent of whether it fits the fixed width criteria and potentially to be able to filter the data being retrieved.



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the teiid-issues mailing list