[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

Van Halbert (JIRA) issues at jboss.org
Thu Jun 5 11:24:15 EDT 2014


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

Van Halbert commented on TEIID-2896:
------------------------------------

>From the 8.8 draft (last sentence), looking at latest:

SELECTOR specifies that delimited lines should only match if the line begins with the selector string followed by a delimiter. The selector value is a valid column value. If a TEXTTABLE SELECTOR is specified, a SELECTOR may also be specified for column values. A column SELECTOR argument will select the nearest preceding text line with the given SELECTOR prefix and select the value at the given 1-based integer position (which includes the selector itself). If no such text line or position with a given line exists, a null value will be produced. A column SELECTOR is not valid with fixed width parsing.

As for the test case, you add null to the end of the line, but in the sample file attached, the actual null column is in the middle.

> 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