cast(Order_TS as Date ) BETWEEN date '2014-01-31' AND date '2015-01-31'
EACH interval '1' month);
2. PRIMARYINDEX (customer_number)
PARTITIONBY range_n (
cast(Order_TS as date) BETWEEN 1140131 AND 1150131
EACH interval '1' month);
I came up with a DDL with the construct as in point - 2 above. I have few questions here.
1. Is there any advantage to define a partition as in point2 above as compared to point1 defn or do they mean the same ?
2. When i try to insert a data for order_date as 150130, the insert fails saying tht invalid partition error. But, should this data not get inserted as this is a 1 month partition table ? or does it mean that only data having order_date as 150131 will be accepted ? As per my understanding, if you have a month partition, data for that defined range can be inserted and they will be grouped together as a partition in an AMP. Error should occur, if you have not defined a partition and you have not mentioned no range, unknown etc. say if the data comes for month of Jan'15, it should be inserted and kept as one partition and if one record is inserted for 150203, then it should fail.
--Samir
Hi Diether,
I experimented yesterday and found that it was an issue as the partition was broken in between ( i had figured it out, but was just confused). In your reply, you mentioned "150130 is 1915-01-30". Is this 2015 or 1915 ?
Hello All,
I have a question regarding PPI in TD 14.10.
1. PRIMARY INDEX (customer_number)
PARTITION BY range_n (
cast(Order_TS as Date ) BETWEEN date '2014-01-31' AND date '2015-01-31'
EACH interval '1' month);
2. PRIMARY INDEX (customer_number)
PARTITION BY range_n (
cast(Order_TS as date) BETWEEN 1140131 AND 1150131
EACH interval '1' month);
I came up with a DDL with the construct as in point - 2 above. I have few questions here.
1. Is there any advantage to define a partition as in point2 above as compared to point1 defn or do they mean the same ?
2. When i try to insert a data for order_date as 150130, the insert fails saying tht invalid partition error. But, should this data not get inserted as this is a 1 month partition table ? or does it mean that only data having order_date as 150131 will be accepted ? As per my understanding, if you have a month partition, data for that defined range can be inserted and they will be grouped together as a partition in an AMP. Error should occur, if you have not defined a partition and you have not mentioned no range, unknown etc. say if the data comes for month of Jan'15, it should be inserted and kept as one partition and if one record is inserted for 150203, then it should fail.
--Samir