Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Column to Row Transformation -- Output data and log differs

Hi,

 

I wanted to transform the table from the following source to the expected output below.

 

Input

0683p000009M9qN.pngInput

Expected Output

0683p000009M9qI.pngExpected Output

 

I think I'm getting quite close with the job design below, however there are two issues here.

 

Job Design and Actual Result

0683p000009M9qS.pngtNormalization -- Job Design and Actual Result

tDBOutput Error

 

tDBOutput_1 Data truncation: Data too long for column 'key' at row 1

 

The logged result matched the expected result, however, it seems not to be processed correctly when trying to export to the output database.

 

Improvement on "tMap_1"'s mapping

As you can see in the screenshot for "tMap_1", I have manually mapped the columns. 

Is there ways to achieve it without manually mapping everything? Is there any expression that could replace manual mapping?

 

=================================================================================================

Component's Setting

1.1) tDBInput's Schema

 

0683p000009M9oI.pngtNormalization -- DBInput's Schema

 

1.2)  tMap_1

0683p000009M9qX.pngtNormalization -- tMap1

 tMap_1's log

[statistics] connecting to socket on port 3672
[statistics] connected
1|k1;v1;,k2;v2;,k3;v3;,k4;v4;,k5;v5;,k6;v6;,k7;v7
[statistics] disconnected

 

1.3) tNormalization

0683p000009M9aG.pngtNormalization

 

tNormalization's Log

[statistics] connected
1|k1;v1;
1|k2;v2;
1|k3;v3;
1|k4;v4;
1|k5;v5;
1|k6;v6;
1|k7;v7
[statistics] disconnected

 

1.4) tMap_2

0683p000009M9qc.pngtNormalization -- tMap2

 

tMap_2's Log

.--+---+-----.
| tLogRow_3 |
|=-+---+----=|
|id|key|value|
|=-+---+----=|
|1 |k1 |v1 |
|2 |k2 |v2 |
|3 |k3 |v3 |
|4 |k4 |v4 |
|5 |k5 |v5 |
|6 |k6 |v6 |
|7 |k7 |v7 |
'--+---+-----'

1.5) tDBOutput

0683p000009M9o8.pngtNormalization -- tDBOutput

tDBOutput's Log

tDBOutput_1 Data truncation: Data too long for column 'key' at row 1

________________________________________________________________________________________________________________

 

Here again I would like to ask about the following two issues.

 

tDBOutput Error

 

tDBOutput_1 Data truncation: Data too long for column 'key' at row 1

 

The logged result matched the expected result, however, when it comes to tDBOutput, seems like all data were crammed into one line/row....

Is there any other components/settings needed when converting to output database?

 

Improvement on "tMap_1"'s mapping

As you can see in the screenshot for "tMap_1", I have manually mapped the columns. 

0683p000009M9qX.pngtNormalization -- tMap1

 

Are there ways to achieve it without manually mapping everything? Is there any expression that could replace manual mapping?

 

[statistics] connecting to socket on port 3672
[statistics] connected
1|k1;v1;,k2;v2;,k3;v3;,k4;v4;,k5;v5;,k6;v6;,k7;v7
[statistics] disconnected

 

 

===================================

 

Thank you

Labels (3)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

as per the error, you need to increase the column length for key column in database side.

View solution in original post

3 Replies
manodwhb
Champion II
Champion II

as per the error, you need to increase the column length for key column in database side.
Anonymous
Not applicable
Author

Thank you!!
I found that column length for tMap_1&2 and tDBOutput was blank.
So when I add a value, it works now.
manodwhb
Champion II
Champion II

Great.