Package @google-cloud/data-qna (2.0.1)

Stay organized with collections Save and categorize content based on your preferences.


Represents a CustomHttpPattern.

Represents a Http.

Represents a HttpRule.

Represents a ResourceDescriptor.

Represents a ResourceReference.

Represents an AnnotatedString.

Represents a SemanticMarkup.

Represents an AutoSuggestionService

Represents a BigQueryJob.

Represents a CreateQuestionRequest.

Represents a DataQuery.

Represents a DebugFlags.

Represents an ExecuteQuestionRequest.

Represents an ExecutionInfo.

Represents a GetQuestionRequest.

Represents a GetUserFeedbackRequest.

Represents a HumanReadable.

Represents an Interpretation.

Represents an InterpretationStructure.

Represents a ColumnInfo.

Represents an InterpretError.

Represents an InterpretAmbiguityDetails.

Represents an InterpretErrorDetails.

Represents an InterpretIncompleteQueryDetails.

Represents an InterpretUnsupportedDetails.

Represents a Question.

Represents a QuestionService

Represents a Suggestion.

Represents a SuggestionInfo.

Represents a MatchInfo.

Represents a SuggestQueriesRequest.

Represents a SuggestQueriesResponse.

Represents an UpdateUserFeedbackRequest.

Represents a UserFeedback.

Represents an Any.

Represents a DescriptorProto.

Represents an ExtensionRange.

Represents a ReservedRange.

Represents an EnumDescriptorProto.

Represents an EnumReservedRange.

Represents an EnumOptions.

Represents an EnumValueDescriptorProto.

Represents an EnumValueOptions.

Represents an ExtensionRangeOptions.

Represents a FieldDescriptorProto.

Represents a FieldMask.

Represents a FieldOptions.

Represents a FileDescriptorProto.

Represents a FileDescriptorSet.

Represents a FileOptions.

Represents a GeneratedCodeInfo.

Represents an Annotation.

Represents a MessageOptions.

Represents a MethodDescriptorProto.

Represents a MethodOptions.

Represents an OneofDescriptorProto.

Represents an OneofOptions.

Represents a ServiceDescriptorProto.

Represents a ServiceOptions.

Represents a SourceCodeInfo.

Represents a Location.

Represents a Timestamp.

Represents an UninterpretedOption.

Represents a NamePart.

Represents a Status.


This stateless API provides automatic suggestions for natural language queries for the data sources in the provided project and location.

The service provides a resourceless operation suggestQueries that can be called to get a list of suggestions for a given incomplete query and scope (or list of scopes) under which the query is to be interpreted.

There are two types of suggestions, ENTITY for single entity suggestions and TEMPLATE for full sentences. By default, both types are returned.

Example Request: ``` GetSuggestions({ parent: "locations/us/projects/my-project" scopes: "//" query: "top it" }) ```

The service will retrieve information based on the given scope(s) and give suggestions based on that (e.g. "top item" for "top it" if "item" is a known dimension for the provided scope). ``` suggestions { suggestion_info { annotated_suggestion { text_formatted: "top item by sum of usd_revenue_net" markups { type: DIMENSION start_char_index: 4 length: 4 } markups { type: METRIC start_char_index: 19 length: 15 } } query_matches { start_char_index: 0 length: 6 } } suggestion_type: TEMPLATE ranking_score: 0.9 } suggestions { suggestion_info { annotated_suggestion { text_formatted: "item" markups { type: DIMENSION start_char_index: 4 length: 2 } } query_matches { start_char_index: 0 length: 6 } } suggestion_type: ENTITY ranking_score: 0.8 } ``` v1alpha


Service to interpret natural language queries. The service allows to create Question resources that are interpreted and are filled with one or more interpretations if the question could be interpreted. Once a Question resource is created and has at least one interpretation, an interpretation can be chosen for execution, which triggers a query to the backend (for BigQuery, it will create a job). Upon successful execution of that interpretation, backend specific information will be returned so that the client can retrieve the results from the backend.

The Question resources are named projects/* /locations/* /questions/*.

The Question resource has a singletion sub-resource UserFeedback named projects/* /locations/* /questions/* /userFeedback, which allows access to user feedback. v1alpha


Properties of a CustomHttpPattern.

Properties of a Http.

Properties of a HttpRule.

Properties of a ResourceDescriptor.

Properties of a ResourceReference.

Properties of a SemanticMarkup.

Properties of an AnnotatedString.

Properties of a BigQueryJob.

Properties of a CreateQuestionRequest.

Properties of a DataQuery.

Properties of a DebugFlags.

Properties of an ExecuteQuestionRequest.

Properties of an ExecutionInfo.

Properties of a GetQuestionRequest.

Properties of a GetUserFeedbackRequest.

Properties of a HumanReadable.

Properties of an Interpretation.

Properties of an InterpretationStructure.

Properties of an InterpretError.

Properties of a ColumnInfo.

Properties of an InterpretAmbiguityDetails.

Properties of an InterpretErrorDetails.

Properties of an InterpretIncompleteQueryDetails.

Properties of an InterpretUnsupportedDetails.

Properties of a Question.

Properties of a Suggestion.

Properties of a SuggestionInfo.

Properties of a SuggestQueriesRequest.

Properties of a SuggestQueriesResponse.

Properties of an UpdateUserFeedbackRequest.

Properties of a UserFeedback.

Properties of a MatchInfo.

Properties of an ExtensionRange.

Properties of a ReservedRange.

Properties of an EnumReservedRange.

Properties of an Annotation.

Properties of an Any.

Properties of a DescriptorProto.

Properties of an EnumDescriptorProto.

Properties of an EnumOptions.

Properties of an EnumValueDescriptorProto.

Properties of an EnumValueOptions.

Properties of an ExtensionRangeOptions.

Properties of a FieldDescriptorProto.

Properties of a FieldMask.

Properties of a FieldOptions.

Properties of a FileDescriptorProto.

Properties of a FileDescriptorSet.

Properties of a FileOptions.

Properties of a GeneratedCodeInfo.

Properties of a MessageOptions.

Properties of a MethodDescriptorProto.

Properties of a MethodOptions.

Properties of an OneofDescriptorProto.

Properties of an OneofOptions.

Properties of a ServiceDescriptorProto.

Properties of a ServiceOptions.

Properties of a SourceCodeInfo.

Properties of a Timestamp.

Properties of an UninterpretedOption.

Properties of a Location.

Properties of a NamePart.

Properties of a Status.


FieldBehavior enum.

History enum.

Style enum.

SemanticMarkupType enum.

JobExecutionState enum.

VisualizationType enum.

InterpretEntity enum.

InterpretErrorCode enum.

SuggestionType enum.

UserFeedbackRating enum.

Label enum.

Type enum.

CType enum.

JSType enum.

OptimizeMode enum.

Semantic enum.

IdempotencyLevel enum.



_default: {
    v1alpha: typeof v1alpha;
    AutoSuggestionServiceClient: typeof v1alpha.AutoSuggestionServiceClient;
    QuestionServiceClient: typeof v1alpha.QuestionServiceClient;


AutoSuggestionServiceClient: typeof v1alpha.AutoSuggestionServiceClient


QuestionServiceClient: typeof v1alpha.QuestionServiceClient

Type Aliases


declare type AutoSuggestionServiceClient = v1alpha.AutoSuggestionServiceClient;

type SuggestQueriesCallback = (error: (Error|null), response?: => void;

Callback as used by .

type CreateQuestionCallback = (error: (Error|null), response?: => void;

Callback as used by .

type ExecuteQuestionCallback = (error: (Error|null), response?: => void;

Callback as used by .

type GetQuestionCallback = (error: (Error|null), response?: => void;

Callback as used by .

type GetUserFeedbackCallback = (error: (Error|null), response?: => void;

Callback as used by .

type UpdateUserFeedbackCallback = (error: (Error|null), response?: => void;

Callback as used by .


declare type QuestionServiceClient = v1alpha.QuestionServiceClient;