Skip to content

aws.textract.get_lending_analysis_summary

Example SQL Queries

SELECT * FROM
aws.textract.get_lending_analysis_summary
WHERE
"job_id" = 'VALUE';

Description

Gets summarized results for the StartLendingAnalysis operation, which analyzes text in a lending document. The returned summary consists of information about documents grouped together by a common document type. Information like detected signatures, page numbers, and split documents is returned with respect to the type of grouped document.

You start asynchronous text analysis by calling StartLendingAnalysis, which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartLendingAnalysis.

To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetLendingAnalysisSummary, and pass the job identifier (JobId) from the initial call to StartLendingAnalysis.

Table Definition

Column NameColumn Data Type
job_id Required Input Column

A unique identifier for the lending or text-detection job. The JobId is returned from StartLendingAnalysis. A JobId value is only valid for 7 days.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
analyze_lending_model_version

The current model version of the Analyze Lending API.

VARCHAR
document_metadata

Information about the input document.

STRUCT(
"pages" BIGINT
)
Show child fields
document_metadata.pages

The number of pages that are detected in the document.

job_status

The current status of the lending analysis job.

VARCHAR
status_message

Returns if the lending analysis could not be completed. Contains explanation for what error occurred.

VARCHAR
summary

Contains summary information for documents grouped by type.

STRUCT(
"document_groups" STRUCT(
"type" VARCHAR,
"split_documents" STRUCT(
"index" BIGINT,
"pages" BIGINT[]
)[],
"detected_signatures" STRUCT(
"page" BIGINT
)[],
"undetected_signatures" STRUCT(
"page" BIGINT
)[]
)[],
"undetected_document_types" VARCHAR[]
)
Show child fields
summary.document_groups[]
Show child fields
summary.document_groups[].detected_signatures[]
Show child fields
summary.document_groups[].detected_signatures[].page

The page a detected signature was found on.

summary.document_groups[].split_documents[]
Show child fields
summary.document_groups[].split_documents[].index

The index for a given document in a DocumentGroup of a specific Type.

summary.document_groups[].split_documents[].pages[]
summary.document_groups[].type

The type of document that Amazon Textract has detected. See Analyze Lending Response Objects for a list of all types returned by Textract.

summary.document_groups[].undetected_signatures[]
Show child fields
summary.document_groups[].undetected_signatures[].page

The page where a signature was expected but not found.

summary.undetected_document_types[]
warnings

A list of warnings that occurred during the lending analysis operation.

STRUCT(
"error_code" VARCHAR,
"pages" BIGINT[]
)[]
Show child fields
warnings[]
Show child fields
warnings[].error_code

The error code for the warning.

warnings[].pages[]