Navneeth Krishnan
09/28/2025, 10:56 AMNavneeth Krishnan
09/30/2025, 4:56 PMColin Ho
10/01/2025, 10:26 PMdf.into_batches(1) to set batch sizes to 1 to get the page by page streaming that you want. You would have code something like this:
df = df.into_batches(1)
df = df.with_column("ocr_result", ocr_udf(df["page"]))
df = df.with_column("entities", entity_extract_udf(df["ocr_result"]))Navneeth Krishnan
10/02/2025, 1:35 AMdaft.func since each pdf will output into multiple pages. And then maybe the code sample that you pasted @Colin Ho?
Is my approach correct?Colin Ho
10/02/2025, 1:35 AMNavneeth Krishnan
10/02/2025, 1:38 AMDataSource help in any way? Or is that an overkill for this use case?Colin Ho
10/02/2025, 2:16 AMNavneeth Krishnan
10/02/2025, 2:30 AMColin Ho
10/02/2025, 2:30 AMNavneeth Krishnan
10/02/2025, 2:38 AM