Getting Tables from a Document

Learn how to extract tables from documents using the get and table keywords.

Syntax

get the document's tables

If there are multiple sections in the document that resemble tables, the system will return them as a list. Below, we show you how to narrow down to a specific table.

Extracting a Specific Table

If a document contains multiple tables, you can specify which one to extract by referencing a column name:

get the document's tables whose columns contain "Column Name"
get the above as the items table

You can also use relative keywords like first, second, or last to target specific tables:

get the document's first table
get the document's third table
get the document's last table

For more precise filtering, you can use multiple column names:

get the document's table whose columns contain "Column1", "Column2", and "Column3"

Extracting Data With Directional Keywords

Directional keywords can be used with document extraction to pinpoint specific lines.

  • below: Looks beneath the reference line

  • above: Looks on top of the reference line

  • left: Looks left of the reference line

  • right: Looks right of the reference line

Example

get the document's first line which contains "recipe"
get the lines below that as the recipe text

Last updated

Was this helpful?