Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
slavomir_garaj
Contributor
Contributor

Strange Dual text after table concatenating

Hi everybody,

I'm experiencing strange behaviour of Dual in Sense 3.2.SR3. Somehow it's related to QVD file load. When I concatenate a second table loaded from QVD but with mixed column order, the Dual column text representation changes from string to date, for example '1930-08-30'.

Even more strange is then when I use FIRST clause the problem disappears.

Is it a bug or am I getting something wrong?

Demo code:

//Prepare random DemoQvd.qvd that contains Dual column

DemoMap:

Mapping Load

  Id,

    dual(Desc, DualId) as DualCol

Inline

[ Id, Desc, DualId

0, 0-TEXT, 11200

1, 1-TEXT, 11110

2, 2-TEXT, 11120

];

DemoQvd:

LOAD

    Pick(Ceil(1*Rand()),date('2017-01-01','YYYY-MM-DD'),date('2017-01-02','YYYY-MM-DD'),date('2017-01-05','YYYY-MM-DD')) as DateCol,

    ApplyMap('DemoMap', Pick(Ceil(3*Rand()),0,1,2)) As DualCol,

    Pick(Ceil(3*Rand()),'A','B','C') as TextCol

Autogenerate 5

While Rand()>=1 or IterNo()=1;

Store DemoQvd into 'lib://QDF Development\99.Shared_Folders\2.QVD/DemoQvd.qvd';

Drop Table DemoQvd;

// Concatenate DEMO OK

DemoTabOK:

LOAD DateCol as OK.DateCol,

     DualCol as OK.DualCol,

  TextCol as OK.TextCol

FROM [lib://QDF Development/99.Shared_Folders\2.QVD\DemoQvd.qvd] (qvd);

Concatenate (DemoTabOK)

Load DateCol as OK.DateCol,

     DualCol as OK.DualCol,

  TextCol as OK.TextCol_XXX

FROM [lib://QDF Development/99.Shared_Folders\2.QVD\DemoQvd.qvd] (qvd);

// Concatenate DEMO BAD

DemoTabBad:

LOAD DateCol as Bad.DateCol,

     DualCol as Bad.DualCol,

  TextCol as Bad.TextCol

FROM [lib://QDF Development/99.Shared_Folders\2.QVD\DemoQvd.qvd] (qvd);

Concatenate (DemoTabBad)

Load TextCol as Bad.TextCol_XXX,  //!!! changed column order !!!

  DateCol as Bad.DateCol,

     DualCol as Bad.DualCol

FROM [lib://QDF Development/99.Shared_Folders\2.QVD\DemoQvd.qvd] (qvd);

// Concatenate DEMO FIXED by FIRST clause

DemoTabFixed:

LOAD DateCol as Fixed.DateCol,

     DualCol as Fixed.DualCol,

  TextCol as Fixed.TextCol

FROM [lib://QDF Development/99.Shared_Folders\2.QVD\DemoQvd.qvd] (qvd);

Concatenate (DemoTabFixed)

FIRST 100 // !!! bizzare fix !!!

Load TextCol as Fixed.TextCol_XXX,

  DateCol as Fixed.DateCol,

     DualCol as Fixed.DualCol

FROM [lib://QDF Development/99.Shared_Folders\2.QVD\DemoQvd.qvd] (qvd);

0 Replies