cloudcat 0.3.6__tar.gz → 0.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cloudcat-0.3.6 → cloudcat-0.3.8}/PKG-INFO +1 -1
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/__init__.py +1 -1
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/cli.py +10 -5
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/compression.py +8 -4
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/PKG-INFO +1 -1
- {cloudcat-0.3.6 → cloudcat-0.3.8}/LICENSE +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/README.md +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/config.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/filtering.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/formatters.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/progress.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/__init__.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/avro.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/csv.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/json.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/orc.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/parquet.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/text.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/__init__.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/azure.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/base.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/gcs.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/s3.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/streaming/__init__.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/streaming/filesystems.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/streaming/stats.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/streaming/tracking.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/SOURCES.txt +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/dependency_links.txt +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/entry_points.txt +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/requires.txt +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/top_level.txt +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/pyproject.toml +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/setup.cfg +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/setup.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/__init__.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/conftest.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_cli.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_compression.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_config.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_data_reading.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_file_filtering.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_filtering.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_format_detection.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_integration.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_output_formatting.py +0 -0
- {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_path_parsing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudcat
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: Preview and analyze data files in Google Cloud Storage, AWS S3, and Azure Data Lake Storage Gen2 from your terminal
|
|
5
5
|
Home-page: https://github.com/jonathansudhakar1/cloudcat
|
|
6
6
|
Author: Jonathan Sudhakar
|
|
@@ -470,7 +470,12 @@ def read_data_streaming(
|
|
|
470
470
|
rows_to_read = (offset + num_rows) if num_rows > 0 else 0
|
|
471
471
|
|
|
472
472
|
# For columnar formats without external compression, try native PyArrow filesystem
|
|
473
|
-
|
|
473
|
+
use_native_fs = input_format in ('parquet', 'orc') and compression is None
|
|
474
|
+
if use_native_fs and not supports_pyarrow_fs():
|
|
475
|
+
click.echo(Fore.YELLOW + "Note: pyarrow.fs not available, downloading full file instead of streaming" + Style.RESET_ALL)
|
|
476
|
+
use_native_fs = False
|
|
477
|
+
|
|
478
|
+
if use_native_fs:
|
|
474
479
|
try:
|
|
475
480
|
pyarrow_fs, _ = get_pyarrow_filesystem(
|
|
476
481
|
service,
|
|
@@ -894,13 +899,13 @@ def main(path, output_format, input_format, columns, num_rows, offset, where, sc
|
|
|
894
899
|
|
|
895
900
|
file_list = get_files_for_multiread(service, bucket, object_path, input_format, max_size_mb, quiet=True)
|
|
896
901
|
|
|
897
|
-
# For a single file
|
|
898
|
-
if len(file_list) == 1
|
|
902
|
+
# For a single file, use streaming read for efficiency
|
|
903
|
+
if len(file_list) == 1:
|
|
899
904
|
single_file_path = file_list[0][0]
|
|
900
905
|
file_name = single_file_path.split('/')[-1]
|
|
901
906
|
update_progress(f"Reading {file_name}...")
|
|
902
907
|
|
|
903
|
-
# Use streaming read
|
|
908
|
+
# Use streaming read for all formats
|
|
904
909
|
df, full_schema, streaming_stats = read_data_streaming(
|
|
905
910
|
service, bucket, single_file_path, input_format, num_rows, columns, delimiter, offset
|
|
906
911
|
)
|
|
@@ -909,7 +914,7 @@ def main(path, output_format, input_format, columns, num_rows, offset, where, sc
|
|
|
909
914
|
click.echo(Fore.BLUE + f"Inferred input format: {input_format}" + Style.RESET_ALL)
|
|
910
915
|
multi_file_list = file_list
|
|
911
916
|
total_record_count = None
|
|
912
|
-
|
|
917
|
+
elif len(file_list) > 1:
|
|
913
918
|
# Read data from multiple files with progress updates
|
|
914
919
|
update_progress(f"Reading {len(file_list)} files...")
|
|
915
920
|
df, full_schema, rows_in_files = read_data_from_multiple_files(
|
|
@@ -46,8 +46,9 @@ def detect_compression(path: str) -> Optional[str]:
|
|
|
46
46
|
path_lower = path.lower()
|
|
47
47
|
|
|
48
48
|
# For Parquet and ORC, snappy is an internal codec - PyArrow handles it
|
|
49
|
-
# Files like .parquet
|
|
50
|
-
if path_lower.endswith('.parquet
|
|
49
|
+
# Files like .snappy.parquet (Spark convention) or .parquet.snappy don't need external decompression
|
|
50
|
+
if (path_lower.endswith('.snappy.parquet') or path_lower.endswith('.parquet.snappy') or
|
|
51
|
+
path_lower.endswith('.snappy.orc') or path_lower.endswith('.orc.snappy')):
|
|
51
52
|
return None
|
|
52
53
|
|
|
53
54
|
if path_lower.endswith('.gz') or path_lower.endswith('.gzip'):
|
|
@@ -122,8 +123,11 @@ def strip_compression_extension(path: str) -> str:
|
|
|
122
123
|
"""
|
|
123
124
|
path_lower = path.lower()
|
|
124
125
|
|
|
125
|
-
# For
|
|
126
|
-
#
|
|
126
|
+
# For Parquet/ORC with snappy naming conventions, snappy is internal codec
|
|
127
|
+
# .snappy.parquet (Spark) - already ends in .parquet, return as-is
|
|
128
|
+
# .parquet.snappy - strip .snappy to get .parquet
|
|
129
|
+
if path_lower.endswith('.snappy.parquet') or path_lower.endswith('.snappy.orc'):
|
|
130
|
+
return path # Already ends with format extension
|
|
127
131
|
if path_lower.endswith('.parquet.snappy'):
|
|
128
132
|
return path[:-len('.snappy')]
|
|
129
133
|
if path_lower.endswith('.orc.snappy'):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudcat
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: Preview and analyze data files in Google Cloud Storage, AWS S3, and Azure Data Lake Storage Gen2 from your terminal
|
|
5
5
|
Home-page: https://github.com/jonathansudhakar1/cloudcat
|
|
6
6
|
Author: Jonathan Sudhakar
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|