From 9d9a2ba7b50f2286def1347dba45c2da5ebed346 Mon Sep 17 00:00:00 2001 From: Itai Admi Date: Thu, 26 Oct 2023 13:26:51 +0300 Subject: [PATCH 1/3] Explain the import destination behaviour for objects and prefixes --- api/swagger.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/swagger.yml b/api/swagger.yml index db579815f1a..d1a65794f6b 100644 --- a/api/swagger.yml +++ b/api/swagger.yml @@ -1250,11 +1250,14 @@ components: description: Path type, can either be 'common_prefix' or 'object' path: type: string - description: A source location to import path or to a single object. Must match the lakeFS installation blockstore type. + description: A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. example: s3://my-bucket/production/collections/ destination: type: string - description: Destination for the imported objects on the branch + description: | + Destination for the imported objects on the branch. Must be a relative path to the branch. + If the type is 'object', the destination is the exact object name under the branch. + If the type is 'common_prefix', the destination is the prefix under the branch. example: collections/ ImportCreation: From f0de1dca3cf7085429bd29179199fc31ba5c3a11 Mon Sep 17 00:00:00 2001 From: Itai Admi Date: Thu, 26 Oct 2023 13:50:07 +0300 Subject: [PATCH 2/3] gen docs --- clients/java-legacy/api/openapi.yaml | 9 ++++++--- clients/java-legacy/docs/ImportLocation.md | 4 ++-- .../java/io/lakefs/clients/api/model/ImportLocation.java | 8 ++++---- clients/java/api/openapi.yaml | 9 ++++++--- clients/java/docs/ImportLocation.md | 4 ++-- .../java/io/lakefs/clients/sdk/model/ImportLocation.java | 4 ++-- clients/python-legacy/docs/ImportLocation.md | 4 ++-- .../python-legacy/lakefs_client/model/import_location.py | 8 ++++---- clients/python/docs/ImportLocation.md | 4 ++-- clients/python/lakefs_sdk/models/import_location.py | 4 ++-- 10 files changed, 32 insertions(+), 26 deletions(-) diff --git a/clients/java-legacy/api/openapi.yaml b/clients/java-legacy/api/openapi.yaml index 426218b5c9e..38d065ce035 100644 --- a/clients/java-legacy/api/openapi.yaml +++ b/clients/java-legacy/api/openapi.yaml @@ -7476,12 +7476,15 @@ components: - object type: string path: - description: A source location to import path or to a single object. Must - match the lakeFS installation blockstore type. + description: A source location to a prefix or to a single object. Must match + the lakeFS installation blockstore type. example: s3://my-bucket/production/collections/ type: string destination: - description: Destination for the imported objects on the branch + description: | + Destination for the imported objects on the branch. Must be a relative path to the branch. + If the type is 'object', the destination is the exact object name under the branch. + If the type is 'common_prefix', the destination is the prefix under the branch. example: collections/ type: string required: diff --git a/clients/java-legacy/docs/ImportLocation.md b/clients/java-legacy/docs/ImportLocation.md index bbea056cd4e..90c992631a9 100644 --- a/clients/java-legacy/docs/ImportLocation.md +++ b/clients/java-legacy/docs/ImportLocation.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**TypeEnum**](#TypeEnum) | Path type, can either be 'common_prefix' or 'object' | -**path** | **String** | A source location to import path or to a single object. Must match the lakeFS installation blockstore type. | -**destination** | **String** | Destination for the imported objects on the branch | +**path** | **String** | A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. | +**destination** | **String** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. | diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ImportLocation.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ImportLocation.java index 9de81d0bbfb..8cf259b8156 100644 --- a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ImportLocation.java +++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ImportLocation.java @@ -119,11 +119,11 @@ public ImportLocation path(String path) { } /** - * A source location to import path or to a single object. Must match the lakeFS installation blockstore type. + * A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. * @return path **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "s3://my-bucket/production/collections/", required = true, value = "A source location to import path or to a single object. Must match the lakeFS installation blockstore type.") + @ApiModelProperty(example = "s3://my-bucket/production/collections/", required = true, value = "A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type.") public String getPath() { return path; @@ -142,11 +142,11 @@ public ImportLocation destination(String destination) { } /** - * Destination for the imported objects on the branch + * Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. * @return destination **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "collections/", required = true, value = "Destination for the imported objects on the branch") + @ApiModelProperty(example = "collections/", required = true, value = "Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. ") public String getDestination() { return destination; diff --git a/clients/java/api/openapi.yaml b/clients/java/api/openapi.yaml index 47ecd685e83..47580bacaf6 100644 --- a/clients/java/api/openapi.yaml +++ b/clients/java/api/openapi.yaml @@ -7450,12 +7450,15 @@ components: - object type: string path: - description: A source location to import path or to a single object. Must - match the lakeFS installation blockstore type. + description: A source location to a prefix or to a single object. Must match + the lakeFS installation blockstore type. example: s3://my-bucket/production/collections/ type: string destination: - description: Destination for the imported objects on the branch + description: | + Destination for the imported objects on the branch. Must be a relative path to the branch. + If the type is 'object', the destination is the exact object name under the branch. + If the type is 'common_prefix', the destination is the prefix under the branch. example: collections/ type: string required: diff --git a/clients/java/docs/ImportLocation.md b/clients/java/docs/ImportLocation.md index 7f7200dd731..457a0d5732f 100644 --- a/clients/java/docs/ImportLocation.md +++ b/clients/java/docs/ImportLocation.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | Path type, can either be 'common_prefix' or 'object' | | -|**path** | **String** | A source location to import path or to a single object. Must match the lakeFS installation blockstore type. | | -|**destination** | **String** | Destination for the imported objects on the branch | | +|**path** | **String** | A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. | | +|**destination** | **String** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. | | diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/model/ImportLocation.java b/clients/java/src/main/java/io/lakefs/clients/sdk/model/ImportLocation.java index aaa6ee29aab..ab2ca36545f 100644 --- a/clients/java/src/main/java/io/lakefs/clients/sdk/model/ImportLocation.java +++ b/clients/java/src/main/java/io/lakefs/clients/sdk/model/ImportLocation.java @@ -142,7 +142,7 @@ public ImportLocation path(String path) { } /** - * A source location to import path or to a single object. Must match the lakeFS installation blockstore type. + * A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. * @return path **/ @javax.annotation.Nonnull @@ -163,7 +163,7 @@ public ImportLocation destination(String destination) { } /** - * Destination for the imported objects on the branch + * Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. * @return destination **/ @javax.annotation.Nonnull diff --git a/clients/python-legacy/docs/ImportLocation.md b/clients/python-legacy/docs/ImportLocation.md index 96b789a5955..d375a9a91f5 100644 --- a/clients/python-legacy/docs/ImportLocation.md +++ b/clients/python-legacy/docs/ImportLocation.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Path type, can either be 'common_prefix' or 'object' | -**path** | **str** | A source location to import path or to a single object. Must match the lakeFS installation blockstore type. | -**destination** | **str** | Destination for the imported objects on the branch | +**path** | **str** | A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. | +**destination** | **str** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/python-legacy/lakefs_client/model/import_location.py b/clients/python-legacy/lakefs_client/model/import_location.py index 2aa881a8d38..2ec27624312 100644 --- a/clients/python-legacy/lakefs_client/model/import_location.py +++ b/clients/python-legacy/lakefs_client/model/import_location.py @@ -114,8 +114,8 @@ def _from_openapi_data(cls, type, path, destination, *args, **kwargs): # noqa: Args: type (str): Path type, can either be 'common_prefix' or 'object' - path (str): A source location to import path or to a single object. Must match the lakeFS installation blockstore type. - destination (str): Destination for the imported objects on the branch + path (str): A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. + destination (str): Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -203,8 +203,8 @@ def __init__(self, type, path, destination, *args, **kwargs): # noqa: E501 Args: type (str): Path type, can either be 'common_prefix' or 'object' - path (str): A source location to import path or to a single object. Must match the lakeFS installation blockstore type. - destination (str): Destination for the imported objects on the branch + path (str): A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. + destination (str): Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/clients/python/docs/ImportLocation.md b/clients/python/docs/ImportLocation.md index 281bf1b1b53..efe3a55f68b 100644 --- a/clients/python/docs/ImportLocation.md +++ b/clients/python/docs/ImportLocation.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Path type, can either be 'common_prefix' or 'object' | -**path** | **str** | A source location to import path or to a single object. Must match the lakeFS installation blockstore type. | -**destination** | **str** | Destination for the imported objects on the branch | +**path** | **str** | A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. | +**destination** | **str** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. | ## Example diff --git a/clients/python/lakefs_sdk/models/import_location.py b/clients/python/lakefs_sdk/models/import_location.py index d39ecfece7c..b85807d69e3 100644 --- a/clients/python/lakefs_sdk/models/import_location.py +++ b/clients/python/lakefs_sdk/models/import_location.py @@ -27,8 +27,8 @@ class ImportLocation(BaseModel): ImportLocation """ type: StrictStr = Field(..., description="Path type, can either be 'common_prefix' or 'object'") - path: StrictStr = Field(..., description="A source location to import path or to a single object. Must match the lakeFS installation blockstore type.") - destination: StrictStr = Field(..., description="Destination for the imported objects on the branch") + path: StrictStr = Field(..., description="A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type.") + destination: StrictStr = Field(..., description="Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. ") __properties = ["type", "path", "destination"] @validator('type') From 111761e394ff3acba3f92a806c530f32c3b5ac1f Mon Sep 17 00:00:00 2001 From: Itai Admi Date: Thu, 2 Nov 2023 09:57:06 +0200 Subject: [PATCH 3/3] Fix last comment --- api/swagger.yml | 6 +++--- clients/java-legacy/api/openapi.yaml | 8 ++++---- clients/java-legacy/docs/ImportLocation.md | 4 ++-- .../java/io/lakefs/clients/api/model/ImportLocation.java | 8 ++++---- clients/java/api/openapi.yaml | 8 ++++---- clients/java/docs/ImportLocation.md | 4 ++-- .../java/io/lakefs/clients/sdk/model/ImportLocation.java | 4 ++-- clients/python-legacy/docs/ImportLocation.md | 4 ++-- .../python-legacy/lakefs_client/model/import_location.py | 8 ++++---- clients/python/docs/ImportLocation.md | 4 ++-- clients/python/lakefs_sdk/models/import_location.py | 4 ++-- docs/assets/js/swagger.yml | 7 +++++-- 12 files changed, 36 insertions(+), 33 deletions(-) diff --git a/api/swagger.yml b/api/swagger.yml index d1a65794f6b..e15b758735f 100644 --- a/api/swagger.yml +++ b/api/swagger.yml @@ -1250,14 +1250,14 @@ components: description: Path type, can either be 'common_prefix' or 'object' path: type: string - description: A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. + description: A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. example: s3://my-bucket/production/collections/ destination: type: string description: | Destination for the imported objects on the branch. Must be a relative path to the branch. - If the type is 'object', the destination is the exact object name under the branch. - If the type is 'common_prefix', the destination is the prefix under the branch. + If the type is an 'object', the destination is the exact object name under the branch. + If the type is a 'common_prefix', the destination is the prefix under the branch. example: collections/ ImportCreation: diff --git a/clients/java-legacy/api/openapi.yaml b/clients/java-legacy/api/openapi.yaml index 38d065ce035..0eb6404c4a6 100644 --- a/clients/java-legacy/api/openapi.yaml +++ b/clients/java-legacy/api/openapi.yaml @@ -7476,15 +7476,15 @@ components: - object type: string path: - description: A source location to a prefix or to a single object. Must match - the lakeFS installation blockstore type. + description: A source location to a 'common_prefix' or to a single object. + Must match the lakeFS installation blockstore type. example: s3://my-bucket/production/collections/ type: string destination: description: | Destination for the imported objects on the branch. Must be a relative path to the branch. - If the type is 'object', the destination is the exact object name under the branch. - If the type is 'common_prefix', the destination is the prefix under the branch. + If the type is an 'object', the destination is the exact object name under the branch. + If the type is a 'common_prefix', the destination is the prefix under the branch. example: collections/ type: string required: diff --git a/clients/java-legacy/docs/ImportLocation.md b/clients/java-legacy/docs/ImportLocation.md index 90c992631a9..fafda9f8982 100644 --- a/clients/java-legacy/docs/ImportLocation.md +++ b/clients/java-legacy/docs/ImportLocation.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**TypeEnum**](#TypeEnum) | Path type, can either be 'common_prefix' or 'object' | -**path** | **String** | A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. | -**destination** | **String** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. | +**path** | **String** | A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. | +**destination** | **String** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. | diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ImportLocation.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ImportLocation.java index 8cf259b8156..e488940abb5 100644 --- a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ImportLocation.java +++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/ImportLocation.java @@ -119,11 +119,11 @@ public ImportLocation path(String path) { } /** - * A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. + * A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. * @return path **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "s3://my-bucket/production/collections/", required = true, value = "A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type.") + @ApiModelProperty(example = "s3://my-bucket/production/collections/", required = true, value = "A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type.") public String getPath() { return path; @@ -142,11 +142,11 @@ public ImportLocation destination(String destination) { } /** - * Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. + * Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. * @return destination **/ @javax.annotation.Nonnull - @ApiModelProperty(example = "collections/", required = true, value = "Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. ") + @ApiModelProperty(example = "collections/", required = true, value = "Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. ") public String getDestination() { return destination; diff --git a/clients/java/api/openapi.yaml b/clients/java/api/openapi.yaml index 47580bacaf6..d47bd8931a2 100644 --- a/clients/java/api/openapi.yaml +++ b/clients/java/api/openapi.yaml @@ -7450,15 +7450,15 @@ components: - object type: string path: - description: A source location to a prefix or to a single object. Must match - the lakeFS installation blockstore type. + description: A source location to a 'common_prefix' or to a single object. + Must match the lakeFS installation blockstore type. example: s3://my-bucket/production/collections/ type: string destination: description: | Destination for the imported objects on the branch. Must be a relative path to the branch. - If the type is 'object', the destination is the exact object name under the branch. - If the type is 'common_prefix', the destination is the prefix under the branch. + If the type is an 'object', the destination is the exact object name under the branch. + If the type is a 'common_prefix', the destination is the prefix under the branch. example: collections/ type: string required: diff --git a/clients/java/docs/ImportLocation.md b/clients/java/docs/ImportLocation.md index 457a0d5732f..b146605df8c 100644 --- a/clients/java/docs/ImportLocation.md +++ b/clients/java/docs/ImportLocation.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | Path type, can either be 'common_prefix' or 'object' | | -|**path** | **String** | A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. | | -|**destination** | **String** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. | | +|**path** | **String** | A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. | | +|**destination** | **String** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. | | diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/model/ImportLocation.java b/clients/java/src/main/java/io/lakefs/clients/sdk/model/ImportLocation.java index ab2ca36545f..1ee37bf9663 100644 --- a/clients/java/src/main/java/io/lakefs/clients/sdk/model/ImportLocation.java +++ b/clients/java/src/main/java/io/lakefs/clients/sdk/model/ImportLocation.java @@ -142,7 +142,7 @@ public ImportLocation path(String path) { } /** - * A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. + * A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. * @return path **/ @javax.annotation.Nonnull @@ -163,7 +163,7 @@ public ImportLocation destination(String destination) { } /** - * Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. + * Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. * @return destination **/ @javax.annotation.Nonnull diff --git a/clients/python-legacy/docs/ImportLocation.md b/clients/python-legacy/docs/ImportLocation.md index d375a9a91f5..683e29ec418 100644 --- a/clients/python-legacy/docs/ImportLocation.md +++ b/clients/python-legacy/docs/ImportLocation.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Path type, can either be 'common_prefix' or 'object' | -**path** | **str** | A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. | -**destination** | **str** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. | +**path** | **str** | A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. | +**destination** | **str** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/python-legacy/lakefs_client/model/import_location.py b/clients/python-legacy/lakefs_client/model/import_location.py index 2ec27624312..e321d70dcf9 100644 --- a/clients/python-legacy/lakefs_client/model/import_location.py +++ b/clients/python-legacy/lakefs_client/model/import_location.py @@ -114,8 +114,8 @@ def _from_openapi_data(cls, type, path, destination, *args, **kwargs): # noqa: Args: type (str): Path type, can either be 'common_prefix' or 'object' - path (str): A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. - destination (str): Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. + path (str): A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. + destination (str): Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -203,8 +203,8 @@ def __init__(self, type, path, destination, *args, **kwargs): # noqa: E501 Args: type (str): Path type, can either be 'common_prefix' or 'object' - path (str): A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. - destination (str): Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. + path (str): A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. + destination (str): Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/clients/python/docs/ImportLocation.md b/clients/python/docs/ImportLocation.md index efe3a55f68b..1c6bb72f962 100644 --- a/clients/python/docs/ImportLocation.md +++ b/clients/python/docs/ImportLocation.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Path type, can either be 'common_prefix' or 'object' | -**path** | **str** | A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type. | -**destination** | **str** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. | +**path** | **str** | A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. | +**destination** | **str** | Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. | ## Example diff --git a/clients/python/lakefs_sdk/models/import_location.py b/clients/python/lakefs_sdk/models/import_location.py index b85807d69e3..36f2b29b699 100644 --- a/clients/python/lakefs_sdk/models/import_location.py +++ b/clients/python/lakefs_sdk/models/import_location.py @@ -27,8 +27,8 @@ class ImportLocation(BaseModel): ImportLocation """ type: StrictStr = Field(..., description="Path type, can either be 'common_prefix' or 'object'") - path: StrictStr = Field(..., description="A source location to a prefix or to a single object. Must match the lakeFS installation blockstore type.") - destination: StrictStr = Field(..., description="Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is 'object', the destination is the exact object name under the branch. If the type is 'common_prefix', the destination is the prefix under the branch. ") + path: StrictStr = Field(..., description="A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type.") + destination: StrictStr = Field(..., description="Destination for the imported objects on the branch. Must be a relative path to the branch. If the type is an 'object', the destination is the exact object name under the branch. If the type is a 'common_prefix', the destination is the prefix under the branch. ") __properties = ["type", "path", "destination"] @validator('type') diff --git a/docs/assets/js/swagger.yml b/docs/assets/js/swagger.yml index db579815f1a..e15b758735f 100644 --- a/docs/assets/js/swagger.yml +++ b/docs/assets/js/swagger.yml @@ -1250,11 +1250,14 @@ components: description: Path type, can either be 'common_prefix' or 'object' path: type: string - description: A source location to import path or to a single object. Must match the lakeFS installation blockstore type. + description: A source location to a 'common_prefix' or to a single object. Must match the lakeFS installation blockstore type. example: s3://my-bucket/production/collections/ destination: type: string - description: Destination for the imported objects on the branch + description: | + Destination for the imported objects on the branch. Must be a relative path to the branch. + If the type is an 'object', the destination is the exact object name under the branch. + If the type is a 'common_prefix', the destination is the prefix under the branch. example: collections/ ImportCreation: