I have a column from a pdf parser
I want to 'fill up' with consecutive integers
E.g.
I have a column as:
RecordID | Value |
1 | R TAX INVOICE |
2 | 😃 WASTE |
3 | 202830 |
4 | BILL TO |
5 | WASTE OPTIONS |
6 | SANDRA & JOHN WRIGHT CONSULTING PTY LI |
7 | PO BOX 118 |
8 | SEVEN HILLS, NSW 1730 |
11 | BP TRAVEL CENTRE BALLINA |
12 | 41 BRUXNER HIGHWAY |
13 | WEST BALLINA, NSW 2478 |
14 | AUSTRALIA. |
35 | 566.28 |
40 | Page 1 of 20 |
41 | — |
42 | — |
43 | = I 202830 |
44 | BILL TO |
45 | WASTE OPTIONS |
46 | SANDRA & JOHN WRIGHT CONSULTING PTY LI |
47 | PO BOX 118 |
48 | SEVEN HILLS, NSW 1730 |
50 | a [Jom Ce AP lead , Oi ayia) Amount GST Amount Incl. |
51 | pyroe taco} ra ar @PoojitaBobba Nis Quantity UOM pees Excl. GST Amount GST |
52 | BOC GAS & GEAR |
53 | 11 SNOW STREET |
57 | 19.8 |
62 | Page 2 of 20 |
63 | — |
64 | — |
65 | = 7 202830 |
66 | BILL TO |
67 | WASTE OPTIONS |
68 | SANDRA & JOHN WRIGHT CONSULTING PTY LI |
69 | PO BOX 118 |
70 | SEVEN HILLS, NSW 1730 |
72 | a [Jom Ce AP lead , Oi ayia) Amount GST Amount Incl. |
74 | HARVEY NORMAN WAREHOUSE |
75 | 10 WILSON STREET |
81 | 294.36 |
85 | ABN 83493775096 BES Cee RET |
86 | Page 3 of 20 |
I want to fill it 'up' from the row containing the string "Page" as below:
RecordID | Value | Fill Up |
1 | R TAX INVOICE | |
2 | 😃 WASTE | |
3 | 202830 | |
4 | BILL TO | |
5 | WASTE OPTIONS | |
6 | SANDRA & JOHN WRIGHT CONSULTING PTY LI | |
7 | PO BOX 118 | |
8 | SEVEN HILLS, NSW 1730 | |
11 | BP TRAVEL CENTRE BALLINA | 1 |
12 | 41 BRUXNER HIGHWAY | 2 |
13 | WEST BALLINA, NSW 2478 | 3 |
14 | AUSTRALIA. | 4 |
35 | 566.28 | 5 |
40 | Page 1 of 20 | 6 |
41 | — | |
42 | — | |
43 | = I 202830 | |
44 | BILL TO | |
45 | WASTE OPTIONS | |
46 | SANDRA & JOHN WRIGHT CONSULTING PTY LI | |
47 | PO BOX 118 | |
48 | SEVEN HILLS, NSW 1730 | |
50 | a [Jom Ce AP lead , Oi ayia) Amount GST Amount Incl. | 1 |
51 | pyroe taco} ra ar @PoojitaBobba Nis Quantity UOM pees Excl. GST Amount GST | 2 |
52 | BOC GAS & GEAR | 3 |
53 | 11 SNOW STREET | 4 |
57 | 19.8 | 5 |
62 | Page 2 of 20 | 6 |
63 | — | |
64 | — | |
65 | = 7 202830 | |
66 | BILL TO | |
67 | WASTE OPTIONS | |
68 | SANDRA & JOHN WRIGHT CONSULTING PTY LI | |
69 | PO BOX 118 | |
70 | SEVEN HILLS, NSW 1730 | |
72 | a [Jom Ce AP lead , Oi ayia) Amount GST Amount Incl. | 1 |
74 | HARVEY NORMAN WAREHOUSE | 2 |
75 | 10 WILSON STREET | 3 |
81 | 294.36 | 4 |
85 | ABN 83493775096 BES Cee RET | 5 |
86 | Page 3 of 20 | 6 |
How can I do it?
Please find sample data in the workflow attached
Here's how I see it - you want the 6 lines above page break. We can identify where the page breaks are. We therefore create a new record id to replace the discontinuous one. We sort out the page breaks. Then we invert our usual record id generation schema and count down 6 rows form the record id of the page number. Re-join up and voila.