Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

BUG (?): Column Fill in text file import does not work

Hi,

Using  File wizard.Transformation I’m  trying to add an extra column which is filled value of adjacent column if the later contains ‘ClusterID’.

FileWizard_1.PNG

FileWizard_2.PNG

FileWizard_3.PNG

This gives desired result on the preview:

FileWizard_4.PNG

The following code is generated

LOAD @1,

     @2,

     @3,

     @4,

     @5

FROM

(txt, utf8, no labels, delimiter is '\t', msq, filters(

ColXtr(3, RowCnd(CellValue, 3, StrCnd(contain, 'ClusterID')), 0),

Replace(4, top, StrCnd(null))

));

(note two extra columns were added)

If i try reload the script, column 4 and 5 are empty!

Now, I've copy the content of the file to excel and using the exact same procedure i came up with the following code:

LOAD @1,

     @2,

     @3,

     @4

FROM

C:\Users\jvn\AppData\Desktop\TaskLog.xlsx

(ooxml, no labels, table is Sheet1, filters(

ColXtr(3, RowCnd(CellValue, 3, StrCnd(contain, 'ClusterID')), 0),

Replace(4, top, StrCnd(null))

));

this, DOES give up the desired results

FileWizard_5.PNG

What am i doing wrong?

Attached zip with source files and .qvw

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

try this

LOAD @1 AS 1,

     @2 AS 2,

     @3 AS 3,

     @4 AS 4

FROM

TaskLog.txt

(txt, utf8, no labels, delimiter is '\t', msq, filters(

ColXtr(3, RowCnd(CellValue, 3, StrCnd(contain, 'cluster')), 4),

Replace(4, top, StrCnd(null))

));

Kind regards

View solution in original post

2 Replies
Not applicable
Author

Hi,

try this

LOAD @1 AS 1,

     @2 AS 2,

     @3 AS 3,

     @4 AS 4

FROM

TaskLog.txt

(txt, utf8, no labels, delimiter is '\t', msq, filters(

ColXtr(3, RowCnd(CellValue, 3, StrCnd(contain, 'cluster')), 4),

Replace(4, top, StrCnd(null))

));

Kind regards

Not applicable
Author

It works! Thanks!!!