Input
The input table, ccmprepare_input, is a collection of nine time series consisting of 10 values for each of three variables (expenditure, income, and investment).
id | period | expenditure | income | investment |
---|---|---|---|---|
1 | 1 | 415 | 451 | 180 |
1 | 2 | 421 | 465 | 179 |
1 | 3 | 434 | 485 | 185 |
1 | 4 | 448 | 493 | 192 |
1 | 5 | 459 | 509 | 211 |
1 | 6 | 458 | 520 | 202 |
1 | 7 | 497 | 521 | 207 |
1 | 8 | 487 | 540 | 214 |
1 | 9 | 497 | 548 | 231 |
1 | 10 | 510 | 558 | 229 |
2 | 1 | 516 | 574 | 234 |
2 | 2 | 525 | 583 | 237 |
2 | 3 | 529 | 591 | 206 |
2 | 4 | 538 | 599 | 250 |
2 | 5 | 546 | 610 | 259 |
2 | 6 | 555 | 627 | 263 |
2 | 7 | 574 | 642 | 264 |
2 | 8 | 574 | 653 | 280 |
2 | 9 | 586 | 660 | 282 |
2 | 10 | 602 | 694 | 292 |
... | ... | ... | ... | ... |
SQL Call
This call splits the input sequences (column_id) into two partitions. The odd and even sequences that are partitioned are identified by column aster_ccm_id in the output.
DROP TABLE ccm_input; CREATE MULTISET TABLE ccm_input DISTRIBUTE BY AS ( SELECT * FROM CCMPrepare ( ON ccmprepare_input PARTITION BY id ) AS dt ) WITH DATA;
Output
This query returns the following table:
SELECT * FROM ccm_input ORDER BY 1, 2, 3;
aster_ccm_id | id | period | expenditure | income | investment |
---|---|---|---|---|---|
0 | 1 | 1 | 415 | 451 | 180 |
0 | 1 | 2 | 421 | 465 | 179 |
0 | 1 | 3 | 434 | 485 | 185 |
0 | 1 | 4 | 448 | 493 | 192 |
0 | 1 | 5 | 459 | 509 | 211 |
0 | 1 | 6 | 458 | 520 | 202 |
0 | 1 | 7 | 479 | 521 | 207 |
0 | 1 | 8 | 487 | 540 | 214 |
0 | 1 | 9 | 497 | 548 | 231 |
0 | 1 | 10 | 510 | 558 | 229 |
... | ... | ... | ... | ... | ... |
0 | 9 | 1 | 1650 | 1910 | 611 |
0 | 9 | 2 | 1685 | 1943 | 597 |
0 | 9 | 3 | 1722 | 1976 | 603 |
0 | 9 | 4 | 1752 | 2018 | 619 |
0 | 9 | 5 | 2145 | 2521 | 833 |
0 | 9 | 6 | 2164 | 2545 | 860 |
0 | 9 | 7 | 2206 | 2580 | 870 |
0 | 9 | 8 | 2225 | 2620 | 830 |
0 | 9 | 9 | 2235 | 2639 | 801 |
0 | 9 | 10 | 2237 | 2618 | 824 |
... | ... | ... | ... | ... | ... |
1 | 2 | 2 | 525 | 583 | 237 |
1 | 2 | 3 | 529 | 591 | 206 |
1 | 2 | 4 | 538 | 599 | 250 |
1 | 2 | 5 | 546 | 610 | 259 |
1 | 2 | 6 | 555 | 627 | 263 |
1 | 2 | 7 | 574 | 642 | 264 |
1 | 2 | 8 | 574 | 653 | 280 |
1 | 2 | 9 | 586 | 660 | 282 |
1 | 2 | 10 | 602 | 694 | 292 |
... | ... | ... | ... | ... | ... |
1 | 8 | 1 | 1355 | 1613 | 525 |
1 | 8 | 2 | 1371 | 1642 | 519 |
1 | 8 | 3 | 1402 | 1690 | 526 |
1 | 8 | 4 | 1452 | 1759 | 510 |
1 | 8 | 5 | 1485 | 1756 | 519 |
1 | 8 | 6 | 1516 | 1780 | 538 |
1 | 8 | 7 | 1549 | 1807 | 549 |
1 | 8 | 8 | 1567 | 1831 | 570 |
1 | 8 | 9 | 1588 | 1873 | 559 |
1 | 8 | 10 | 1631 | 1897 | 584 |