Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest.
Request message for Import methods.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#auto_generate_ids
def auto_generate_ids() -> ::Boolean
-
(::Boolean) — Whether to automatically generate IDs for the documents if absent.
If set to
true
, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set tofalse
, Document.ids have to be specified using id_field, otherwises, documents without IDs will fail to be imported.Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is
custom
. Otherwise, an INVALID_ARGUMENT error is thrown.
#auto_generate_ids=
def auto_generate_ids=(value) -> ::Boolean
-
value (::Boolean) — Whether to automatically generate IDs for the documents if absent.
If set to
true
, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set tofalse
, Document.ids have to be specified using id_field, otherwises, documents without IDs will fail to be imported.Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is
custom
. Otherwise, an INVALID_ARGUMENT error is thrown.
-
(::Boolean) — Whether to automatically generate IDs for the documents if absent.
If set to
true
, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set tofalse
, Document.ids have to be specified using id_field, otherwises, documents without IDs will fail to be imported.Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is
custom
. Otherwise, an INVALID_ARGUMENT error is thrown.
#bigquery_source
def bigquery_source() -> ::Google::Cloud::DiscoveryEngine::V1::BigQuerySource
- (::Google::Cloud::DiscoveryEngine::V1::BigQuerySource) — BigQuery input source.
#bigquery_source=
def bigquery_source=(value) -> ::Google::Cloud::DiscoveryEngine::V1::BigQuerySource
- value (::Google::Cloud::DiscoveryEngine::V1::BigQuerySource) — BigQuery input source.
- (::Google::Cloud::DiscoveryEngine::V1::BigQuerySource) — BigQuery input source.
#error_config
def error_config() -> ::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig
- (::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig) — The desired location of errors incurred during the Import.
#error_config=
def error_config=(value) -> ::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig
- value (::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig) — The desired location of errors incurred during the Import.
- (::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig) — The desired location of errors incurred during the Import.
#gcs_source
def gcs_source() -> ::Google::Cloud::DiscoveryEngine::V1::GcsSource
- (::Google::Cloud::DiscoveryEngine::V1::GcsSource) — Cloud Storage location for the input content.
#gcs_source=
def gcs_source=(value) -> ::Google::Cloud::DiscoveryEngine::V1::GcsSource
- value (::Google::Cloud::DiscoveryEngine::V1::GcsSource) — Cloud Storage location for the input content.
- (::Google::Cloud::DiscoveryEngine::V1::GcsSource) — Cloud Storage location for the input content.
#id_field
def id_field() -> ::String
-
(::String) — The field in the Cloud Storage and BigQuery sources that indicates the
unique IDs of the documents.
For GcsSource it is the key of the JSON field. For instance,
my_id
for JSON{"my_id": "some_uuid"}
. For BigQuerySource it is the column name of the BigQuery table where the unique ids are stored.The values of the JSON field or the BigQuery column will be used as the Document.ids. The JSON field or the BigQuery column must be of string type, and the values must be set as valid strings conform to RFC-1034 with 1-63 characters. Otherwise, documents without valid IDs will fail to be imported.
Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is
custom
. And only set this field when auto_generate_ids is unset or set asfalse
. Otherwise, an INVALID_ARGUMENT error is thrown.If it is unset, a default value
_id
is used when importing from the allowed data sources.
#id_field=
def id_field=(value) -> ::String
-
value (::String) — The field in the Cloud Storage and BigQuery sources that indicates the
unique IDs of the documents.
For GcsSource it is the key of the JSON field. For instance,
my_id
for JSON{"my_id": "some_uuid"}
. For BigQuerySource it is the column name of the BigQuery table where the unique ids are stored.The values of the JSON field or the BigQuery column will be used as the Document.ids. The JSON field or the BigQuery column must be of string type, and the values must be set as valid strings conform to RFC-1034 with 1-63 characters. Otherwise, documents without valid IDs will fail to be imported.
Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is
custom
. And only set this field when auto_generate_ids is unset or set asfalse
. Otherwise, an INVALID_ARGUMENT error is thrown.If it is unset, a default value
_id
is used when importing from the allowed data sources.
-
(::String) — The field in the Cloud Storage and BigQuery sources that indicates the
unique IDs of the documents.
For GcsSource it is the key of the JSON field. For instance,
my_id
for JSON{"my_id": "some_uuid"}
. For BigQuerySource it is the column name of the BigQuery table where the unique ids are stored.The values of the JSON field or the BigQuery column will be used as the Document.ids. The JSON field or the BigQuery column must be of string type, and the values must be set as valid strings conform to RFC-1034 with 1-63 characters. Otherwise, documents without valid IDs will fail to be imported.
Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is
custom
. And only set this field when auto_generate_ids is unset or set asfalse
. Otherwise, an INVALID_ARGUMENT error is thrown.If it is unset, a default value
_id
is used when importing from the allowed data sources.
#inline_source
def inline_source() -> ::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::InlineSource
- (::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::InlineSource) — The Inline source for the input content for documents.
#inline_source=
def inline_source=(value) -> ::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::InlineSource
- value (::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::InlineSource) — The Inline source for the input content for documents.
- (::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::InlineSource) — The Inline source for the input content for documents.
#parent
def parent() -> ::String
-
(::String) — Required. The parent branch resource name, such as
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}
. Requires create/update permission.
#parent=
def parent=(value) -> ::String
-
value (::String) — Required. The parent branch resource name, such as
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}
. Requires create/update permission.
-
(::String) — Required. The parent branch resource name, such as
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}
. Requires create/update permission.
#reconciliation_mode
def reconciliation_mode() -> ::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::ReconciliationMode
- (::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::ReconciliationMode) — The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL.
#reconciliation_mode=
def reconciliation_mode=(value) -> ::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::ReconciliationMode
- value (::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::ReconciliationMode) — The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL.
- (::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest::ReconciliationMode) — The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL.