NL2SQLTrainingDocumentsPost¶
- pydantic model openapi_client.models.nl2_sql_training_documents_post.NL2SQLTrainingDocumentsPost¶
Request body for POST /nl2sql/training-documents. All four properties are strictly required; omitting any of them is rejected with IPV-1008. Creating the document only registers it: upload the actual file afterwards via GET /nl2sql/training-documents/{id}?action=get_upload_url.
- Fields:
- field document_name: Annotated[str, Field(min_length=3, strict=True, max_length=50)] [Required] (alias 'DocumentName')¶
Name of the training document. Must start with a letter and may contain letters, digits, hyphens and underscores. Must be unique across the platform, compared case-insensitively; a duplicate is rejected with IPV-1018.
- Constraints:
strict = True
min_length = 3
max_length = 50
- field document_type: StrictStr [Required] (alias 'DocumentType')¶
Kind of training material this document holds. SQL holds example queries, QnA holds question and answer pairs, and Documentation holds free-form reference text. Any other value is rejected with IPV-1041.
- Constraints:
strict = True
- field associated_resource_type: StrictStr [Required] (alias 'AssociatedResourceType')¶
Type of resource the document trains against. Dataset is the only supported value; anything else is rejected with IPV-1041.
- Constraints:
strict = True
- field associated_resource_id: StrictStr [Required] (alias 'AssociatedResourceId')¶
Identifier of the dataset this document is associated with. The caller must have access to it, and its TargetLocation must be s3athena or redshift, since those are the only backends SQL AI can query. Both failures are rejected with IPV-1004.
- Constraints:
strict = True
- to_str()¶
Returns the string representation of the model using alias
- Return type:
str
- to_json()¶
Returns the JSON representation of the model using alias
- Return type:
str
- classmethod from_json(json_str)¶
Create an instance of NL2SQLTrainingDocumentsPost from a JSON string
- Return type:
Optional[Self]
- to_dict()¶
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- Return type:
Dict[str,Any]
- classmethod from_dict(obj)¶
Create an instance of NL2SQLTrainingDocumentsPost from a dict
- Return type:
Optional[Self]