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
1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 | |