Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Error on Random sampling limited to % of the segment

andreeam-nc
Level 1
Level 1

Hi!

I am trying to do a Random sampling limited to 50 % of the segment. On random sampling from entire incoming target, I get no error (considering Split activity set up would not differ too much) but this is not what I need

For instance: my target population has 75 recipients; I filter by gender Code of targeting dimension equal to 'F'; then select Random sampling, limited to 50 % of the segment. On running the WF, the Split activity fails. This is what I get in the journal:

02/10/2018 11:26:15 PM       extract Only 0 record(s) have been selected while 9 were requested for result 'Female' of extraction 'Split'.

02/10/2018 11:26:15 PM       extract SQL statement 'INSERT INTO wkf63278912_53_1(iId,sGENDER,sSegmentCode) SELECT   W0.iId FROM wkf63278912_52_1 W0 JOIN NmsRecipient R1 ON (R1.iRecipientId = W0.iId) WHERE (R1.sGENDER = E'F') ORDER BY random() LIMIT 9' could not be executed.

02/10/2018 11:26:15 PM       extract PostgreSQL error: ERROR:  INSERT has more target columns than expressions LINE 1: INSERT INTO wkf63278912_53_1(iId,sGENDER,sSegmentCode) SELEC... ^

Tried in 2-3 environments with different data - same thing every time. Can anyone help please?

thank you,

Andreea

1 Accepted Solution
shrawans3153003
Correct answer by
Employee
Employee

Hi Andreea,
Have you selected gender and segment as output columns while querying from Recipients.

Could you please remove that and run the workflow again.

1415617_pastedImage_0.png

View solution in original post

2 Replies
shrawans3153003
Correct answer by
Employee
Employee

Hi Andreea,
Have you selected gender and segment as output columns while querying from Recipients.

Could you please remove that and run the workflow again.

1415617_pastedImage_0.png

View solution in original post

andreeam-nc
Level 1
Level 1

Hi, this helped me solve it, thank you! I had actually assigned segment codes in the split activity; once removed those, the split activity ran and segment population count - as expected.

But now, to complicate the scenario a bit -  what if before the split I'm using an enrichment ? (I'm loading some data and the query will be made by one of the fields loaded; also, one of the fields previously loaded will be used in the delivery. Do you see any solution for this?