Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Crosstab tool concatenated outfield field size limits

hroderick-thr
11 - Bolide

I'm trying to use crosstab tool to build a long comma separated list in a single field.

I set the size to 1 million.

The concatenated length should be 13728 but it is truncating at 13558

 

hroderick-thr_0-1611758917177.png

 

5 REPLIES 5
JagdeeshN
12 - Quasar
12 - Quasar

Hi @hroderick-thr ,

 

I tried to replicate the same and found the field size to pick up the '200000' defined in the Cross Tab tool. Please refer to the attached workflow.

 

Can you please confirm the field length you see for the concatenated field after the Cross Tab. You can see this by place a select right after. I ask as sometime the truncating happens because of field sizes defined in subsequent tools.

 

Best,

Jagdeesh Narayanan

hroderick-thr
11 - Bolide

Good idea @JagdeeshN but still not working

Before the tool, I trimmed the input field size to 15 and the concatenated output field from 2 million to 20k. The output of crosstab tool is shown below.

 

hroderick-thr_0-1611760525058.png

 

I also did a length formula on the concatenated x2 field to see 13,558

and the rightmost characters are ,'997389422','998290299','9985109

 
 

 

 

clmc9601
13 - Pulsar
13 - Pulsar

Hi @hroderick-thr,

Perhaps you have duplicate values in your data. Crosstab automatically removes/combines duplicates, which would explain why your string is shorter than anticipated. You can test this by putting a unique tool in front of your crosstab and seeing what emerges from the D anchor. If you want to find exactly which strings are duplicates, you can use summarize to group by each string and count how many times it appears.

 

Looks like you might be able to use summarize to achieve the desired result since you're only grouping by one field. I'm pretty sure Summarize concatenates based on incoming row order, which will not remove duplicates.

hroderick-thr
11 - Bolide

I think I mistook the root cause of my problem.

I could not reproduce the error with only the crosstab tool and may have been misled by message truncation.

 

The failure was happening when I inserted the string prepared by crosstab tool into dynamic sql tool. I now suspect the true bug is in some limit of that tool or the sql driver it uses.

 

To correct, I put the dynamic sql into an iterative macro and split my long list of values into several lists  containing a limited number of values that dynamic sql could process.

 

Thanks for all the ideas offered!

 

 

hroderick-thr
11 - Bolide

True root cause found!

 

Oracle sql breaks when list of items is over 1000 items 

 

Alteryx For-The-Win

Labels