RobWunderlich / Qlikview-Components

A library for common Qlikview Scripting tasks
197 stars 99 forks source link

Issue with Qvc.SegmentedStore Qvc11.3 #95

Open alihmb opened 1 year ago

alihmb commented 1 year ago

The expected result after running the code below is 4 QVDs

V_ORDERS_2022_09.QVD

V_ORDERS_2022_10.QVD

V_ORDERS_2022_11.QVD

V_ORDERS_2022_12.QVD

But this is not what I'm getting.

I get only 3 QVDs 09,10,12 (missing V_ORDERS_2022_11.QVD)

orders for month 11 are merged with 12. orders for date 2022-10-01 are added to V_ORDERS_2022_09.QVD while V_ORDERS_2022_10.QVD starts with date 2022-10-02

I doubled checked all my dates, they are all the same formate and no nulls.

/************************************
LOAD V_ORDERS table and create a shiftdate field.
************************************/
LOAD DATE#(SHIFT_DAY,'YYYYMMDD') as SHIFTDATE,
     *
FROM
[..\QVD_STORE\V_ORDERS.qvd]
(qvd) where SHIFT_DAY >= 20220901;

/************************************
Save V_ORDERS table into monthly QVDs
************************************/
CALL Qvc.SegmentedStore ('V_ORDERS', 'SHIFTDATE', '$(vLocalSavePath)', 'V_ORDERS', 'MONTH', 1);

// Drop the sales table
DROP TABLE V_ORDERS;
alihmb commented 1 year ago

To further clarify, V_ORDERS QVD has data from 20130801 to 20221220.

RobWunderlich commented 1 year ago
  1. Can you post the script log?
  2. Can you provide a sample data file where this problem occurs? Maybe produce your V_ORDERs.qvd without identifying or sensitive fields.