Skip to content

Commit 141948e

Browse files
committed
Update python client and documentation.
1 parent 07192c0 commit 141948e

File tree

10 files changed

+140
-89
lines changed

10 files changed

+140
-89
lines changed

distribution/python/dqops/client/models/compression_type.py

+2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
class CompressionType(str, Enum):
55
AUTO = "auto"
66
GZIP = "gzip"
7+
LZ4 = "lz4"
78
NONE = "none"
9+
SNAPPY = "snappy"
810
ZSTD = "zstd"
911

1012
def __str__(self) -> str:

distribution/python/dqops/client/models/csv_file_format_spec.py

+9
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class CsvFileFormatSpec:
1919
allow_quoted_nulls (Union[Unset, bool]): Option to allow the conversion of quoted values to NULL values.
2020
auto_detect (Union[Unset, bool]): Enables auto detection of CSV parameters.
2121
compression (Union[Unset, CompressionType]):
22+
no_compression_extension (Union[Unset, bool]): Whether the compression extension is present at the end of the
23+
file name.
2224
dateformat (Union[Unset, str]): Specifies the date format to use when parsing dates.
2325
decimal_separator (Union[Unset, str]): The decimal separator of numbers.
2426
delim (Union[Unset, str]): Specifies the string that separates columns within each row (line) of the file.
@@ -41,6 +43,7 @@ class CsvFileFormatSpec:
4143
allow_quoted_nulls: Union[Unset, bool] = UNSET
4244
auto_detect: Union[Unset, bool] = UNSET
4345
compression: Union[Unset, CompressionType] = UNSET
46+
no_compression_extension: Union[Unset, bool] = UNSET
4447
dateformat: Union[Unset, str] = UNSET
4548
decimal_separator: Union[Unset, str] = UNSET
4649
delim: Union[Unset, str] = UNSET
@@ -64,6 +67,7 @@ def to_dict(self) -> Dict[str, Any]:
6467
if not isinstance(self.compression, Unset):
6568
compression = self.compression.value
6669

70+
no_compression_extension = self.no_compression_extension
6771
dateformat = self.dateformat
6872
decimal_separator = self.decimal_separator
6973
delim = self.delim
@@ -92,6 +96,8 @@ def to_dict(self) -> Dict[str, Any]:
9296
field_dict["auto_detect"] = auto_detect
9397
if compression is not UNSET:
9498
field_dict["compression"] = compression
99+
if no_compression_extension is not UNSET:
100+
field_dict["no_compression_extension"] = no_compression_extension
95101
if dateformat is not UNSET:
96102
field_dict["dateformat"] = dateformat
97103
if decimal_separator is not UNSET:
@@ -137,6 +143,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
137143
else:
138144
compression = CompressionType(_compression)
139145

146+
no_compression_extension = d.pop("no_compression_extension", UNSET)
147+
140148
dateformat = d.pop("dateformat", UNSET)
141149

142150
decimal_separator = d.pop("decimal_separator", UNSET)
@@ -173,6 +181,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
173181
allow_quoted_nulls=allow_quoted_nulls,
174182
auto_detect=auto_detect,
175183
compression=compression,
184+
no_compression_extension=no_compression_extension,
176185
dateformat=dateformat,
177186
decimal_separator=decimal_separator,
178187
delim=delim,

distribution/python/dqops/client/models/json_file_format_spec.py

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class JsonFileFormatSpec:
1818
auto_detect (Union[Unset, bool]): Whether to auto-detect detect the names of the keys and data types of the
1919
values automatically.
2020
compression (Union[Unset, CompressionType]):
21+
no_compression_extension (Union[Unset, bool]): Whether the compression extension is present at the end of the
22+
file name.
2123
convert_strings_to_integers (Union[Unset, bool]): Whether strings representing integer values should be
2224
converted to a numerical type.
2325
dateformat (Union[Unset, str]): Specifies the date format to use when parsing dates.
@@ -36,6 +38,7 @@ class JsonFileFormatSpec:
3638

3739
auto_detect: Union[Unset, bool] = UNSET
3840
compression: Union[Unset, CompressionType] = UNSET
41+
no_compression_extension: Union[Unset, bool] = UNSET
3942
convert_strings_to_integers: Union[Unset, bool] = UNSET
4043
dateformat: Union[Unset, str] = UNSET
4144
filename: Union[Unset, bool] = UNSET
@@ -55,6 +58,7 @@ def to_dict(self) -> Dict[str, Any]:
5558
if not isinstance(self.compression, Unset):
5659
compression = self.compression.value
5760

61+
no_compression_extension = self.no_compression_extension
5862
convert_strings_to_integers = self.convert_strings_to_integers
5963
dateformat = self.dateformat
6064
filename = self.filename
@@ -80,6 +84,8 @@ def to_dict(self) -> Dict[str, Any]:
8084
field_dict["auto_detect"] = auto_detect
8185
if compression is not UNSET:
8286
field_dict["compression"] = compression
87+
if no_compression_extension is not UNSET:
88+
field_dict["no_compression_extension"] = no_compression_extension
8389
if convert_strings_to_integers is not UNSET:
8490
field_dict["convert_strings_to_integers"] = convert_strings_to_integers
8591
if dateformat is not UNSET:
@@ -117,6 +123,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
117123
else:
118124
compression = CompressionType(_compression)
119125

126+
no_compression_extension = d.pop("no_compression_extension", UNSET)
127+
120128
convert_strings_to_integers = d.pop("convert_strings_to_integers", UNSET)
121129

122130
dateformat = d.pop("dateformat", UNSET)
@@ -152,6 +160,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
152160
json_file_format_spec = cls(
153161
auto_detect=auto_detect,
154162
compression=compression,
163+
no_compression_extension=no_compression_extension,
155164
convert_strings_to_integers=convert_strings_to_integers,
156165
dateformat=dateformat,
157166
filename=filename,

distribution/python/dqops/client/models/parquet_file_format_spec.py

+26
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from attrs import define as _attrs_define
44
from attrs import field as _attrs_field
55

6+
from ..models.compression_type import CompressionType
67
from ..types import UNSET, Unset
78

89
T = TypeVar("T", bound="ParquetFileFormatSpec")
@@ -20,13 +21,18 @@ class ParquetFileFormatSpec:
2021
hive_partitioning (Union[Unset, bool]): Whether or not to interpret the path as a hive partitioned path.
2122
union_by_name (Union[Unset, bool]): Whether the columns of multiple schemas should be unified by name, rather
2223
than by position.
24+
compression (Union[Unset, CompressionType]):
25+
no_compression_extension (Union[Unset, bool]): Whether the compression extension is present at the end of the
26+
file name.
2327
"""
2428

2529
binary_as_string: Union[Unset, bool] = UNSET
2630
filename: Union[Unset, bool] = UNSET
2731
file_row_number: Union[Unset, bool] = UNSET
2832
hive_partitioning: Union[Unset, bool] = UNSET
2933
union_by_name: Union[Unset, bool] = UNSET
34+
compression: Union[Unset, CompressionType] = UNSET
35+
no_compression_extension: Union[Unset, bool] = UNSET
3036
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
3137

3238
def to_dict(self) -> Dict[str, Any]:
@@ -35,6 +41,11 @@ def to_dict(self) -> Dict[str, Any]:
3541
file_row_number = self.file_row_number
3642
hive_partitioning = self.hive_partitioning
3743
union_by_name = self.union_by_name
44+
compression: Union[Unset, str] = UNSET
45+
if not isinstance(self.compression, Unset):
46+
compression = self.compression.value
47+
48+
no_compression_extension = self.no_compression_extension
3849

3950
field_dict: Dict[str, Any] = {}
4051
field_dict.update(self.additional_properties)
@@ -49,6 +60,10 @@ def to_dict(self) -> Dict[str, Any]:
4960
field_dict["hive_partitioning"] = hive_partitioning
5061
if union_by_name is not UNSET:
5162
field_dict["union_by_name"] = union_by_name
63+
if compression is not UNSET:
64+
field_dict["compression"] = compression
65+
if no_compression_extension is not UNSET:
66+
field_dict["no_compression_extension"] = no_compression_extension
5267

5368
return field_dict
5469

@@ -65,12 +80,23 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
6580

6681
union_by_name = d.pop("union_by_name", UNSET)
6782

83+
_compression = d.pop("compression", UNSET)
84+
compression: Union[Unset, CompressionType]
85+
if isinstance(_compression, Unset):
86+
compression = UNSET
87+
else:
88+
compression = CompressionType(_compression)
89+
90+
no_compression_extension = d.pop("no_compression_extension", UNSET)
91+
6892
parquet_file_format_spec = cls(
6993
binary_as_string=binary_as_string,
7094
filename=filename,
7195
file_row_number=file_row_number,
7296
hive_partitioning=hive_partitioning,
7397
union_by_name=union_by_name,
98+
compression=compression,
99+
no_compression_extension=no_compression_extension,
74100
)
75101

76102
parquet_file_format_spec.additional_properties = d

0 commit comments

Comments
 (0)