LookoutMetrics / Client / get_sample_data

get_sample_data#

LookoutMetrics.Client.get_sample_data(**kwargs)#

Returns a selection of sample records from an Amazon S3 datasource.

See also: AWS API Documentation

Request Syntax

response = client.get_sample_data(
    S3SourceConfig={
        'RoleArn': 'string',
        'TemplatedPathList': [
            'string',
        ],
        'HistoricalDataPathList': [
            'string',
        ],
        'FileFormatDescriptor': {
            'CsvFormatDescriptor': {
                'FileCompression': 'NONE'|'GZIP',
                'Charset': 'string',
                'ContainsHeader': True|False,
                'Delimiter': 'string',
                'HeaderList': [
                    'string',
                ],
                'QuoteSymbol': 'string'
            },
            'JsonFormatDescriptor': {
                'FileCompression': 'NONE'|'GZIP',
                'Charset': 'string'
            }
        }
    }
)
Parameters:

S3SourceConfig (dict) –

A datasource bucket in Amazon S3.

  • RoleArn (string) – [REQUIRED]

    The Amazon Resource Name (ARN) of the role.

  • TemplatedPathList (list) –

    An array of strings containing the list of templated paths.

    • (string) –

  • HistoricalDataPathList (list) –

    An array of strings containing the historical set of data paths.

    • (string) –

  • FileFormatDescriptor (dict) – [REQUIRED]

    Contains information about a source file’s formatting.

    • CsvFormatDescriptor (dict) –

      Contains information about how a source CSV data file should be analyzed.

      • FileCompression (string) –

        The level of compression of the source CSV file.

      • Charset (string) –

        The character set in which the source CSV file is written.

      • ContainsHeader (boolean) –

        Whether or not the source CSV file contains a header.

      • Delimiter (string) –

        The character used to delimit the source CSV file.

      • HeaderList (list) –

        A list of the source CSV file’s headers, if any.

        • (string) –

      • QuoteSymbol (string) –

        The character used as a quote character.

    • JsonFormatDescriptor (dict) –

      Contains information about how a source JSON data file should be analyzed.

      • FileCompression (string) –

        The level of compression of the source CSV file.

      • Charset (string) –

        The character set in which the source JSON file is written.

Return type:

dict

Returns:

Response Syntax

{
    'HeaderValues': [
        'string',
    ],
    'SampleRows': [
        [
            'string',
        ],
    ]
}

Response Structure

  • (dict) –

    • HeaderValues (list) –

      A list of header labels for the records.

      • (string) –

    • SampleRows (list) –

      A list of records.

      • (list) –

        • (string) –

Exceptions