lending_analysis
Creates, updates, deletes, gets or lists a lending_analysis resource.
Overview
| Name | lending_analysis |
| Type | Resource |
| Id | aws.textract.lending_analysis |
Fields
The following fields are returned by SELECT queries:
- get_lending_analysis
| Name | Datatype | Description |
|---|---|---|
analyze_lending_model_version | string | The current model version of the Analyze Lending API. |
document_metadata | object | Information about the input document. |
job_status | string | The current status of the lending analysis job. (IN_PROGRESS, SUCCEEDED, FAILED, PARTIAL_SUCCESS) |
next_token | string | If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of lending results. (pattern: <code>.\S.</code>) |
results | array | Holds the information returned by one of AmazonTextract's document analysis operations for the pinstripe. |
status_message | string | Returns if the lending analysis job could not be completed. Contains explanation for what error occurred. |
warnings | array | A list of warnings that occurred during the lending analysis operation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_lending_analysis | select | region | Gets the results for an Amazon Textract asynchronous operation that analyzes text in a lending 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 GetLendingAnalysis, and pass the job identifier (JobId) from the initial call to StartLendingAnalysis. | |
start_lending_analysis | exec | region, DocumentLocation | Starts the classification and analysis of an input document. StartLendingAnalysis initiates the classification and analysis of a packet of lending documents. StartLendingAnalysis operates on a document file located in an Amazon S3 bucket. StartLendingAnalysis can analyze text in documents that are in one of the following formats: JPEG, PNG, TIFF, PDF. Use DocumentLocation to specify the bucket name and the file name of the document. StartLendingAnalysis returns a job identifier (JobId) that you use to get the results of the operation. When the text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If the status is SUCCEEDED you can call either GetLendingAnalysis or GetLendingAnalysisSummary and provide the JobId to obtain the results of the analysis. If using OutputConfig to specify an Amazon S3 bucket, the output will be contained within the specified prefix in a directory labeled with the job-id. In the directory there are 3 sub-directories: detailedResponse (contains the GetLendingAnalysis response) summaryResponse (for the GetLendingAnalysisSummary response) splitDocuments (documents split across logical boundaries) |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_lending_analysis
Gets the results for an Amazon Textract asynchronous operation that analyzes text in a lending 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 GetLendingAnalysis, and pass the job identifier (JobId) from the initial call to StartLendingAnalysis.
SELECT
analyze_lending_model_version,
document_metadata,
job_status,
next_token,
results,
status_message,
warnings
FROM aws.textract.lending_analysis
WHERE region = '{{ region }}' -- required
;
Lifecycle Methods
- start_lending_analysis
Starts the classification and analysis of an input document. StartLendingAnalysis initiates the classification and analysis of a packet of lending documents. StartLendingAnalysis operates on a document file located in an Amazon S3 bucket. StartLendingAnalysis can analyze text in documents that are in one of the following formats: JPEG, PNG, TIFF, PDF. Use DocumentLocation to specify the bucket name and the file name of the document. StartLendingAnalysis returns a job identifier (JobId) that you use to get the results of the operation. When the text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If the status is SUCCEEDED you can call either GetLendingAnalysis or GetLendingAnalysisSummary and provide the JobId to obtain the results of the analysis. If using OutputConfig to specify an Amazon S3 bucket, the output will be contained within the specified prefix in a directory labeled with the job-id. In the directory there are 3 sub-directories: detailedResponse (contains the GetLendingAnalysis response) summaryResponse (for the GetLendingAnalysisSummary response) splitDocuments (documents split across logical boundaries)
EXEC aws.textract.lending_analysis.start_lending_analysis
@region='{{ region }}' --required
@@json=
'{
"DocumentLocation": "{{ DocumentLocation }}",
"ClientRequestToken": "{{ ClientRequestToken }}",
"JobTag": "{{ JobTag }}",
"NotificationChannel": "{{ NotificationChannel }}",
"OutputConfig": "{{ OutputConfig }}",
"KMSKeyId": "{{ KMSKeyId }}"
}'
;