Session Ready
Exercise

Generating chunk numbers

You are given a table history with two columns: chapter for chapter number, and text for chapter text. Assuming a text chunk size of 1000 words, create a new column document_number containing the sequential number of a chunk.

Instructions
100 XP
  • Unnest the tokens.
  • Assign table row number as the word index number.
  • Do integer division by 1000 and assign the result to a new column document_number.