QuickSight / Client / predict_qa_results

predict_qa_results#

QuickSight.Client.predict_qa_results(**kwargs)#

Predicts existing visuals or generates new visuals to answer a given query.

See also: AWS API Documentation

Request Syntax

response = client.predict_qa_results(
    AwsAccountId='string',
    QueryText='string',
    IncludeQuickSightQIndex='INCLUDE'|'EXCLUDE',
    IncludeGeneratedAnswer='INCLUDE'|'EXCLUDE',
    MaxTopicsToConsider=123
)
Parameters:
  • AwsAccountId (string) –

    [REQUIRED]

    The ID of the Amazon Web Services account that the user wants to execute Predict QA results in.

  • QueryText (string) –

    [REQUIRED]

    The query text to be used to predict QA results.

  • IncludeQuickSightQIndex (string) – Indicates whether Q indicies are included or excluded.

  • IncludeGeneratedAnswer (string) – Indicates whether generated answers are included or excluded.

  • MaxTopicsToConsider (integer) – The number of maximum topics to be considered to predict QA results.

Return type:

dict

Returns:

Response Syntax

{
    'PrimaryResult': {
        'ResultType': 'DASHBOARD_VISUAL'|'GENERATED_ANSWER'|'NO_ANSWER',
        'DashboardVisual': {
            'DashboardId': 'string',
            'DashboardName': 'string',
            'SheetId': 'string',
            'SheetName': 'string',
            'VisualId': 'string',
            'VisualTitle': 'string',
            'VisualSubtitle': 'string',
            'DashboardUrl': 'string'
        },
        'GeneratedAnswer': {
            'QuestionText': 'string',
            'AnswerStatus': 'ANSWER_GENERATED'|'ANSWER_RETRIEVED'|'ANSWER_DOWNGRADE',
            'TopicId': 'string',
            'TopicName': 'string',
            'Restatement': 'string',
            'QuestionId': 'string',
            'AnswerId': 'string',
            'QuestionUrl': 'string'
        }
    },
    'AdditionalResults': [
        {
            'ResultType': 'DASHBOARD_VISUAL'|'GENERATED_ANSWER'|'NO_ANSWER',
            'DashboardVisual': {
                'DashboardId': 'string',
                'DashboardName': 'string',
                'SheetId': 'string',
                'SheetName': 'string',
                'VisualId': 'string',
                'VisualTitle': 'string',
                'VisualSubtitle': 'string',
                'DashboardUrl': 'string'
            },
            'GeneratedAnswer': {
                'QuestionText': 'string',
                'AnswerStatus': 'ANSWER_GENERATED'|'ANSWER_RETRIEVED'|'ANSWER_DOWNGRADE',
                'TopicId': 'string',
                'TopicName': 'string',
                'Restatement': 'string',
                'QuestionId': 'string',
                'AnswerId': 'string',
                'QuestionUrl': 'string'
            }
        },
    ],
    'RequestId': 'string',
    'Status': 123
}

Response Structure

  • (dict) –

    • PrimaryResult (dict) –

      The primary visual response.

      • ResultType (string) –

        The type of QA result.

      • DashboardVisual (dict) –

        The representation of a dashboard visual result.

        • DashboardId (string) –

          The ID of the dashboard.

        • DashboardName (string) –

          The name of the dashboard.

        • SheetId (string) –

          The ID of the sheet.

        • SheetName (string) –

          The name of the sheet.

        • VisualId (string) –

          The ID of the visual.

        • VisualTitle (string) –

          The title of the visual.

        • VisualSubtitle (string) –

          The subtitle of the visual.

        • DashboardUrl (string) –

          The URL of the dashboard.

      • GeneratedAnswer (dict) –

        The representation of a generated answer result.

        • QuestionText (string) –

          The question text.

        • AnswerStatus (string) –

          The answer status of the generated answer.

        • TopicId (string) –

          The ID of the topic.

        • TopicName (string) –

          The name of the topic.

        • Restatement (string) –

          The restatement for the answer.

        • QuestionId (string) –

          The ID of the question.

        • AnswerId (string) –

          The ID of the answer.

        • QuestionUrl (string) –

          The URL of the question.

    • AdditionalResults (list) –

      Additional visual responses.

      • (dict) –

        The QA result that is made from the DashboardVisual or GeneratedAnswer.

        • ResultType (string) –

          The type of QA result.

        • DashboardVisual (dict) –

          The representation of a dashboard visual result.

          • DashboardId (string) –

            The ID of the dashboard.

          • DashboardName (string) –

            The name of the dashboard.

          • SheetId (string) –

            The ID of the sheet.

          • SheetName (string) –

            The name of the sheet.

          • VisualId (string) –

            The ID of the visual.

          • VisualTitle (string) –

            The title of the visual.

          • VisualSubtitle (string) –

            The subtitle of the visual.

          • DashboardUrl (string) –

            The URL of the dashboard.

        • GeneratedAnswer (dict) –

          The representation of a generated answer result.

          • QuestionText (string) –

            The question text.

          • AnswerStatus (string) –

            The answer status of the generated answer.

          • TopicId (string) –

            The ID of the topic.

          • TopicName (string) –

            The name of the topic.

          • Restatement (string) –

            The restatement for the answer.

          • QuestionId (string) –

            The ID of the question.

          • AnswerId (string) –

            The ID of the answer.

          • QuestionUrl (string) –

            The URL of the question.

    • RequestId (string) –

      The Amazon Web Services request ID for this operation.

    • Status (integer) –

      The HTTP status of the request.

Exceptions