discover_input_schema
¶
discover_input_schema(
service_execution_role: RoleARN,
*,
config_overrides: Optional[KinesisAnalyticsV2ClientConfig] = 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/kinesis_analytics_v2.py
1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 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 | |