discover_input_schema
async
¶
discover_input_schema(
service_execution_role: RoleARN,
*,
config_overrides: Optional[AsyncKinesisAnalyticsV2ClientConfig] = None,
resource_arn: Optional[ResourceARN] = None,
input_starting_position_configuration: Optional[
InputStartingPositionConfiguration
] = None,
s3_configuration: Optional[S3Configuration] = None,
input_processing_configuration: Optional[InputProcessingConfiguration] = None,
) -> DiscoverInputSchemaResponse
Infers a schema for a SQL-based Kinesis Data Analytics application by evaluating sample records on the specified streaming source (Kinesis data stream or Kinesis Data Firehose delivery stream) or Amazon S3 object. In the response, the operation returns the inferred schema and also the sample records that the operation used to infer the schema.
You can use the inferred schema when configuring a streaming source for your application. When you create an application using the Kinesis Data Analytics console, the console uses this operation to infer a schema and show it in the console user interface.
Parameters:
-
resource_arn(Optional[ResourceARN], default:None) –The Amazon Resource Name (ARN) of the streaming source.
-
service_execution_role(RoleARN) –The ARN of the role that is used to access the streaming source.
-
input_starting_position_configuration(Optional[InputStartingPositionConfiguration], default:None) –The point at which you want Kinesis Data Analytics to start reading records from the specified streaming source for discovery purposes.
-
s3_configuration(Optional[S3Configuration], default:None) –Specify this parameter to discover a schema from data in an Amazon S3 object.
-
input_processing_configuration(Optional[InputProcessingConfiguration], default:None) –The InputProcessingConfiguration to use to preprocess the records before discovering the schema of the records.
Raises:
-
InvalidArgumentException–The specified input parameter value is not valid.
-
InvalidRequestException–The request JSON is not valid for the operation.
-
ResourceProvisionedThroughputExceededException–Discovery failed to get a record from the streaming source because of the Kinesis Streams
ProvisionedThroughputExceededException. For more information, see GetRecords in the Amazon Kinesis Streams API Reference. -
ServiceUnavailableException–The service cannot complete the request.
-
UnableToDetectSchemaException–The data format is not valid. Kinesis Data Analytics cannot detect the schema for the given streaming source.
-
UnsupportedOperationException–The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_kinesis_analytics_v2/_services/async_kinesis_analytics_v2.py
1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 | |