Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Release (2025-XX-XX)
- `intake`: [v0.4.0](services/intake/CHANGELOG.md#v040)
- **Feature:** Add new enum class `PartitioningUpdateType`
- **Feature:** Add attributes `partition_by` and `partitioning` to `IntakeCatalogPatch` model class
- `authorization`: [v0.5.0](services/authorization/CHANGELOG.md#v050)
- Add new `etag` attribute to `Role` model class
- `ske`: [v1.4.0](services/ske/CHANGELOG.md#v140)
Expand Down
4 changes: 4 additions & 0 deletions services/intake/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.4.0
- **Feature:** Add new enum class `PartitioningUpdateType`
- **Feature:** Add attributes `partition_by` and `partitioning` to `IntakeCatalogPatch` model class

## v0.3.0
- Validate `display_name` attribute regular expression using a field validator in model classes `CreateIntakePayload`, `CreateIntakeRunnerPayload` and `CreateIntakeUserPayload`
- Set minimum length (`12`) for `password` attribute in model class `CreateIntakeUserPayload`
Expand Down
2 changes: 1 addition & 1 deletion services/intake/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-intake"

[tool.poetry]
name = "stackit-intake"
version = "v0.3.0"
version = "v0.4.0"
authors = [
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
]
Expand Down
6 changes: 5 additions & 1 deletion services/intake/src/stackit/intake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down Expand Up @@ -46,6 +46,7 @@
"ListIntakeUsersResponse",
"ListIntakesResponse",
"PartitioningType",
"PartitioningUpdateType",
"UpdateIntakePayload",
"UpdateIntakeRunnerPayload",
"UpdateIntakeUserPayload",
Expand Down Expand Up @@ -105,6 +106,9 @@
ListIntakesResponse as ListIntakesResponse,
)
from stackit.intake.models.partitioning_type import PartitioningType as PartitioningType
from stackit.intake.models.partitioning_update_type import (
PartitioningUpdateType as PartitioningUpdateType,
)
from stackit.intake.models.update_intake_payload import (
UpdateIntakePayload as UpdateIntakePayload,
)
Expand Down
2 changes: 1 addition & 1 deletion services/intake/src/stackit/intake/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion services/intake/src/stackit/intake/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion services/intake/src/stackit/intake/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion services/intake/src/stackit/intake/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
3 changes: 2 additions & 1 deletion services/intake/src/stackit/intake/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand All @@ -32,6 +32,7 @@
from stackit.intake.models.list_intake_users_response import ListIntakeUsersResponse
from stackit.intake.models.list_intakes_response import ListIntakesResponse
from stackit.intake.models.partitioning_type import PartitioningType
from stackit.intake.models.partitioning_update_type import PartitioningUpdateType
from stackit.intake.models.update_intake_payload import UpdateIntakePayload
from stackit.intake.models.update_intake_runner_payload import UpdateIntakeRunnerPayload
from stackit.intake.models.update_intake_user_payload import UpdateIntakeUserPayload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This API provides endpoints for managing Intakes.
The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
2 changes: 1 addition & 1 deletion services/intake/src/stackit/intake/models/dremio_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
4 changes: 2 additions & 2 deletions services/intake/src/stackit/intake/models/intake_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down Expand Up @@ -36,7 +36,7 @@ class IntakeCatalog(BaseModel):
)
partition_by: Optional[List[Annotated[str, Field(strict=True, max_length=1024)]]] = Field(
default=None,
description="List of Iceberg partitioning expressions to use when creating the target table. This setting can only be used when `partitioning` is set to `manual`. Partitioning configuration of an Intake cannot be changed after creation. See the [Apache Iceberg spec](https://iceberg.apache.org/spec/#partitioning) for more details. ",
description="List of Iceberg partitioning expressions to use when creating the target table. This setting can only be used when `partitioning` is set to `manual`. Partitioning configuration of an Intake can be changed after creation, but will only take effect once the table has been changed as well. In case of not updating the table to a new one, the old partitioning configuration will remain. See the [Apache Iceberg spec](https://iceberg.apache.org/spec/#partitioning) for more details. ",
alias="partitionBy",
)
partitioning: Optional[PartitioningType] = PartitioningType.NONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand All @@ -21,6 +21,7 @@
from typing_extensions import Annotated, Self

from stackit.intake.models.catalog_auth_patch import CatalogAuthPatch
from stackit.intake.models.partitioning_update_type import PartitioningUpdateType


class IntakeCatalogPatch(BaseModel):
Expand All @@ -33,6 +34,12 @@ class IntakeCatalogPatch(BaseModel):
default="intake",
description="The namespace to which data shall be written. It will be automatically created, if it does not exist.",
)
partition_by: Optional[List[Annotated[str, Field(strict=True, max_length=1024)]]] = Field(
default=None,
description="List of Iceberg partitioning expressions to use when creating the target table. This setting can only be used when `partitioning` is set to `manual`. See the [Apache Iceberg spec](https://iceberg.apache.org/spec/#partitioning) for more details. ",
alias="partitionBy",
)
partitioning: Optional[PartitioningUpdateType] = None
table_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1024)]] = Field(
default=None,
description="The table name is a short name chosen by the user to identify the table in Iceberg.",
Expand All @@ -45,7 +52,15 @@ class IntakeCatalogPatch(BaseModel):
default=None,
description="The Iceberg warehouse to connect to, required when the catalog has no default warehouse configured.",
)
__properties: ClassVar[List[str]] = ["auth", "namespace", "tableName", "uri", "warehouse"]
__properties: ClassVar[List[str]] = [
"auth",
"namespace",
"partitionBy",
"partitioning",
"tableName",
"uri",
"warehouse",
]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -87,6 +102,11 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of auth
if self.auth:
_dict["auth"] = self.auth.to_dict()
# set to None if partition_by (nullable) is None
# and model_fields_set contains the field
if self.partition_by is None and "partition_by" in self.model_fields_set:
_dict["partitionBy"] = None

return _dict

@classmethod
Expand All @@ -102,6 +122,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
{
"auth": CatalogAuthPatch.from_dict(obj["auth"]) if obj.get("auth") is not None else None,
"namespace": obj.get("namespace") if obj.get("namespace") is not None else "intake",
"partitionBy": obj.get("partitionBy"),
"partitioning": obj.get("partitioning"),
"tableName": obj.get("tableName"),
"uri": obj.get("uri"),
"warehouse": obj.get("warehouse"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding: utf-8

"""
STACKIT Intake API

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations

import json
from enum import Enum

from typing_extensions import Self


class PartitioningUpdateType(str, Enum):
"""
The target table's partitioning. * `none` disables partitioning. * `intake-time` configures daily partitioning based on the automatically created ingestion time column `__intake_ts`. * `manual` allows arbitrary Iceberg partitioning expression to be set via `partitionBy`.
"""

"""
allowed enum values
"""
NONE = "none"
INTAKE_MINUS_TIME = "intake-time"
MANUAL = "manual"

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of PartitioningUpdateType from a JSON string"""
return cls(json.loads(json_str))
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This API provides endpoints for managing Intakes.

The version of the OpenAPI document: 1beta.3.4
The version of the OpenAPI document: 1beta.3.5
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Expand Down
Loading