Skip to main content
Production use of this feature is available for specific editions only. Contact our sales team for more information.
Amazon Textract Input is an orchestration component that uses the Textract API to extract text, handwriting, layout elements, and other data from scanned documents. You can choose to include footers and page numbers in the extraction process. The component uses the Textract API to retrieve data to load into a table—this stages the data, so the table is reloaded each time. You can then use transformations to enrich and manage the data in permanent tables. For more information, read Amazon Textract. You do not need to set up a Create Table component before using this component. Amazon Textract supports the following document formats, as per aws.amazon.com:
Amazon Textract currently supports PNG, JPEG, TIFF, and PDF formats. For synchronous APIs, you can submit images either as an S3 object or as a byte array. For asynchronous APIs, you can submit S3 objects. If your document is already in one of the file formats that Amazon Textract supports (PDF, TIFF, JPG, PNG), don’t convert or downsample it before uploading it to Amazon Textract.
You can find more information about Amazon Textract in the Amazon Textract FAQs.

Prerequisites

Before you use the Amazon Textract Input component, you’ll need to add AWS cloud credentials to .

Properties

Reference material is provided below for the Configure and Destination properties.
Name
string
required
A human-readable name for the component.

Configure

S3 Bucket region
drop-down
required
The AWS region where the S3 bucket you want to connect to is located.
S3 Object Prefix
string
required
The S3 path to the bucket, folder, or file that will be processed. For example, s3://bucket-name/, or s3://bucket-name/folder/, or s3://bucket-name/folder/specific-file.pdf.
Source File Filter Pattern
string
A regex pattern that is used to filter files. This is useful when you select a bucket/folder in the S3 Object Prefix parameter, and want to filter which files are processed. For example, a value of .*\.pdf$ will match all files with a .pdf ending, or could be used to match on specific parts of a file name.
Include Raw Output
boolean
When true (Yes), the raw output will be included. The raw output is the exact JSON structure provided by Amazon Textract. Users may wish to manually parse the JSON to run their own processing on it, such as via a Python script with the Python Pushdown component.
Layout Features
dual listbox
Select assets of text you want to extract from the document. Available assets include footers, page numbers, tables, and forms.

Destination

Select your cloud data warehouse.
Destination
drop-down
required
Select the destination for your data. This is either in Snowflake as a table or as files in cloud storage.
  • Snowflake: Load your data into a table in Snowflake. The data must first be staged via Snowflake or a cloud storage solution.
  • Cloud Storage: Load your data directly into files in your preferred cloud storage location. The format of these files can differ between source systems and will not have a file extension so we suggest inspecting the output to determine the format of the data.
Warehouse
drop-down
required
The Snowflake warehouse used to run the queries. The special value [Environment Default] uses the warehouse defined in the environment. Read Overview of Warehouses to learn more.
Database
drop-down
required
The Snowflake database to access. The special value [Environment Default] uses the database defined in the environment. Read Databases, Tables and Views - Overview to learn more.
Schema
drop-down
required
The Snowflake schema. The special value [Environment Default] uses the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.
Table Name
string
required
The name of the table to be created in your Snowflake database. You can use a Table Input component in a transformation pipeline to access and transform this data after it has been loaded.
Load Strategy
drop-down
required
Define what happens if the table name already exists in the specified Snowflake database and schema.
  • Replace: If the specified table name already exists, that table will be destroyed and replaced by the table created during this pipeline run.
  • Truncate and Insert: Each time the pipeline runs, two operations are performed: first, the table is truncated, meaning all existing rows are deleted. Then, your new rows are inserted. The table itself is never destroyed and recreated.
  • Fail if Exists: If the specified table name already exists, this pipeline will fail to run.
  • Append: If the specified table name already exists, then the data is inserted without altering or deleting the existing data in the table. It’s appended onto the end of the existing data in the table. If the specified table name doesn’t exist, then the table will be created, and your data will be inserted into the table.
Primary Keys
dual listbox
Select one or more columns to be designated as the table’s primary key.
Clean Staged files
boolean
required
  • Yes: Staged files will be destroyed after data is loaded. This is the default setting.
  • No: Staged files are retained in the staging area after data is loaded.
Stage Access Strategy
drop-down
Select the stage access strategy. The strategies available depend on the cloud platform you select in Stage Platform.
  • Credentials: Connects to the external stage (AWS, Azure) using your configured cloud provider credentials. Not available for Google Cloud Storage.
  • Storage Integration: Use a Snowflake storage integration to grant access to Snowflake to read data from and write to a cloud storage location. This will reveal the Storage Integration property, through which you can select any of your existing Snowflake storage integrations.
Stage Platform
drop-down
required
Use the drop-down menu to choose where the data is staged before being loaded into your Snowflake table.
  • Amazon S3: Stage your data on an AWS S3 bucket.
  • Snowflake: Stage your data on a Snowflake internal stage.
  • Azure Storage: Stage your data in an Azure Blob Storage container.
  • Google Cloud Storage: Stage your data in a Google Cloud Storage bucket.
Internal Stage Type
drop-down
required
Select the Snowflake internal stage type. Use the Snowflake links provided to learn more about each type of stage.
  • User: Each Snowflake user has a user stage allocated to them by default for file storage. You may find the user stage convenient if your files will only be accessed by a single user, but need to be copied into multiple tables.
  • Named: A named stage provides high flexibility for data loading. Users with the appropriate privileges on the stage can load data into any table. Furthermore, because the stage is a database object, any security or access rules that apply to all objects will apply to the named stage.
Named stages can be altered and dropped. User stages cannot.
Named Stage
drop-down
required
Select your named stage. Read Creating a named stage to learn how to create a new named stage.
There is a known issue where named stages that include special characters or spaces are not supported.

Deactivate soft delete for Azure blobs (Databricks)

If you intend to set your destination as Databricks and your stage platform as Azure Storage, you must turn off the “Enable soft delete for blobs” setting in your Azure account for your pipeline to run successfully. To do this:
  1. In the Azure portal, navigate to your storage account.
  2. In the menu, under Data management, click Data protection.
  3. Clear the Enable soft delete for blobs checkbox. For more information, read Soft delete for blobs.