Skip to main content

DBHouse Utils

Dump convertor utility

Enums

CompressionMethod

Enum for select current compression method

  • NONE - without compression
  • LZ4 - lz4 compression
  • ZSTD - zstd compression

DumpType

Enum for dump class classification

  • NATIVE - Clickhouse native
  • PGCOPY - Postgres/Greenplum pgcopy
  • PGPACK - Postgres/Greenplum pgpack container with metadata and pgcopy

DumpClass

NamedTuple object for DumpType value

  • name: str
  • reader: object
  • writer: object
  • have_compress: bool

Cython functions

columns_from_metadata

Function for convert pgpack metadata to native column list

metadata_from_columns

Function for convert native column list to pgpack metadata

pgoid_from_metadata

Function for convert pgpack metadata to pgcopy oid list

Python functions

chunk_fileobj

Function for make iterable bytes chunks from file

dump_convertor

Function for convert dump to another dump

A dump in Native format can be converted to PGPack or PGCopy, or you can leave it in Native format but change the compression codec. A dump in PGPack format can be converted to Native or PGCopy, or you can leave it in PGPack format but change the compression codec. A dump in PGCopy format cannot be converted to other formats due to its storage characteristics (no metadata), but you can change the compression codec for compact storage of the dump on disk.

Example

from dbhose_utils import dump_convertor

source = "path_to_source_dump"
destination = "path_to_output_dump"
dump_type = "native"  # Native, PGPack or PGCopy output format
compression_method = "lz4"  # lz4, zstd or none

dump_convertor(
    source=source,
    destination=destination,
    dump_type=dump_type,
    compression_method=compression_method,
)

dump_detective

Function for auto detect dump type and compression method

Make current reader object from dump

from dbhose_utils import dump_detective

file = "path_to_any_dump"

reader = dump_detective(file)

dump_recovery

Added dump_recovery function to recover data from incomplete dumps

How it works

For pgpack and pgcopy, the damaged archive is recovered to the last valid row; for native, the damaged archive is recovered to the last valid block. Why might this be useful? Let's say you were dumping a table and at that moment the server crashed/the connection was lost/some other force majeure occurred. Now you have the opportunity to retrieve at least some data if you need it here and now.

from dbhose_utils import dump_recovery

file_path = "path_to_broken_dump"
recovery_path = "path_to_recovery_dump"

dump_recovery(
    file_path=file_path,
    recovery_path=recovery_path,
)

Installation

From pip

pip install dbhose-utils

From local directory

pip install .

From git

pip install git+https://github.com/0xMihalich/dbhose_utils

Metadata

Release files for dbhose-utils 0.0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for dbhose-utils 0.0.2.5
File
dbhose_utils-0.0.2.5-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
dbhose_utils-0.0.2.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
dbhose_utils-0.0.2.5-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
dbhose_utils-0.0.2.5-cp314-cp314-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.15+ x86-64 Details
dbhose_utils-0.0.2.5-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
dbhose_utils-0.0.2.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
dbhose_utils-0.0.2.5-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
dbhose_utils-0.0.2.5-cp313-cp313-macosx_10_14_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.14+ x86-64 Details
dbhose_utils-0.0.2.5-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
dbhose_utils-0.0.2.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
dbhose_utils-0.0.2.5-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
dbhose_utils-0.0.2.5-cp312-cp312-macosx_10_14_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.14+ x86-64 Details
dbhose_utils-0.0.2.5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
dbhose_utils-0.0.2.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
dbhose_utils-0.0.2.5-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
dbhose_utils-0.0.2.5-cp311-cp311-macosx_10_14_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.14+ x86-64 Details
dbhose_utils-0.0.2.5-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
dbhose_utils-0.0.2.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
dbhose_utils-0.0.2.5-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
dbhose_utils-0.0.2.5-cp310-cp310-macosx_10_14_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.14+ x86-64 Details

Total release size: 2.5 MB

Release files / dbhose_utils-0.0.2.5-cp314-cp314-win_amd64.whl

Download URL dbhose_utils-0.0.2.5-cp314-cp314-win_amd64.whl
Size 53.5 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
a952a2ab82ac9617d04fc2657828a53d5b1d91e5ab44b94f669709fb55b3f272
BLAKE2b-256 checksum
How to use checksums
fa30e16c2eb9b60fcfb50573b44a49e92899fc47fce45b28afaa9bb879b97522
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 329.9 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8366b877ff593900244b7e402d830c7e098b505e4fb4d0d4fc05aa73efe69795
BLAKE2b-256 checksum
How to use checksums
abd532fd10713edba1a85e912e392a650c262f5a9cea2bd1c76dcddfb71737f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp314-cp314-macosx_11_0_arm64.whl

Download URL dbhose_utils-0.0.2.5-cp314-cp314-macosx_11_0_arm64.whl
Size 57.0 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b19f4812ba7dc872b26ea60732d872830717c4fc3714efc162f9e041758da70d
BLAKE2b-256 checksum
How to use checksums
53401a624b1c2e7d543d447782cf5fcf243aea702ca2eb90dcbd8d2b0f9482c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp314-cp314-macosx_10_15_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp314-cp314-macosx_10_15_x86_64.whl
Size 58.1 kB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
36d639649dcc023cbd7b6f983676a2311cde019c28da4f663142f0cff918ec22
BLAKE2b-256 checksum
How to use checksums
b5a65dd77de1093c11d8300a1f808d66e45c93d6fc5bda3a8303e3a87b247d29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp313-cp313-win_amd64.whl

Download URL dbhose_utils-0.0.2.5-cp313-cp313-win_amd64.whl
Size 52.3 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
7009fe1405e0b80297a7816f43c44aa2ffa4590cc9997214d2a5b0a69c9038f7
BLAKE2b-256 checksum
How to use checksums
205a0a0981213c957a922f835aa964e623b3baada0d2d5e3631f87152ae5b26c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 329.0 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
71eba883f9736abb3f88470dc0ce4e85d37eee887dbfd2976310050bba60440d
BLAKE2b-256 checksum
How to use checksums
fbb4fcfdcab1052dc66000ebd30615850b028d5150cff0ec5651b8472cd1738c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp313-cp313-macosx_11_0_arm64.whl

Download URL dbhose_utils-0.0.2.5-cp313-cp313-macosx_11_0_arm64.whl
Size 57.1 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b16b23815db531cb1d5aa1c96a8a791ffa9b143209d1e05264edf186cc6af692
BLAKE2b-256 checksum
How to use checksums
83673e4b56bf270f9f7c242892addbdde990bcea046551eb48a8a05376fd1913
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp313-cp313-macosx_10_14_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp313-cp313-macosx_10_14_x86_64.whl
Size 58.2 kB
Tags CPython 3.13 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
2a8dec1e223ec1f943d4e728a95f88fa6388c95fcc7e70a598dd4ef84b5a0f41
BLAKE2b-256 checksum
How to use checksums
632475f12937c78e0b248adbaf4a25b957e70e1eaff9bac4679bffeec870e9c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp312-cp312-win_amd64.whl

Download URL dbhose_utils-0.0.2.5-cp312-cp312-win_amd64.whl
Size 52.4 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c352d0b80f408e9088b769cc9805a724acce8d61c68beae8ed852c19c2173809
BLAKE2b-256 checksum
How to use checksums
c648f4565ac537a6506e279bdadfbbe9c8c8127e6abfee7356d8e60bba1607a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 344.5 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3a384cc4c302c620a4ee854fe74388881ab508ddf2a6fbf09a67179d3c7706cf
BLAKE2b-256 checksum
How to use checksums
824d97f51b095389bbd16b1e94c9679f0107a55c4645563bce10cb08a7acc986
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp312-cp312-macosx_11_0_arm64.whl

Download URL dbhose_utils-0.0.2.5-cp312-cp312-macosx_11_0_arm64.whl
Size 57.5 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7763c886a56a54a7a4c2c5d45632343040cb23b9345724601086d8185c5dbed6
BLAKE2b-256 checksum
How to use checksums
7e6022586c86960c8e5ee28539d5e8f3e1821c76beb674833db072662ea7583b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp312-cp312-macosx_10_14_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp312-cp312-macosx_10_14_x86_64.whl
Size 58.3 kB
Tags CPython 3.12 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
7a44194b22dfa2f18928e804a62e0c8733cf597f257222457b31e8e507439ee2
BLAKE2b-256 checksum
How to use checksums
c237786dff618f88f154fffdc082a4b5769acc353e91cc280d2613674b16b958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp311-cp311-win_amd64.whl

Download URL dbhose_utils-0.0.2.5-cp311-cp311-win_amd64.whl
Size 56.8 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
0ea1d60aaf2d30d4c276cefe0801a0359dc4dd49f08b45000de14d34f29518b5
BLAKE2b-256 checksum
How to use checksums
578112fb61ecc16d17198ed4963c5cf5e40a49bee1c372aa7e87ff48ce26ea9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 336.4 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9903ace301f979d625032e9f1a0dbbcdb4a51317bde7dbb1f37df0e58796b0d9
BLAKE2b-256 checksum
How to use checksums
b22a570a2f966eab261aaffc2516a5bfc08380b4d5fdb87a43cbd4c2a293011b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp311-cp311-macosx_11_0_arm64.whl

Download URL dbhose_utils-0.0.2.5-cp311-cp311-macosx_11_0_arm64.whl
Size 59.8 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7ac298de90dfcbd762ecaffc15fb9e95c412faa4e7af200a8bb445c9618069c9
BLAKE2b-256 checksum
How to use checksums
d5c319f19421d3bdaa5879ba623e24c32d1e30eb65da2136208c6a396673f0c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp311-cp311-macosx_10_14_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp311-cp311-macosx_10_14_x86_64.whl
Size 66.3 kB
Tags CPython 3.11 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
04db4208a04e623b7bc7657d675c7c5194cc47e33ef55ccf8d44e7e6003d2d23
BLAKE2b-256 checksum
How to use checksums
22e84a52338ab1a033c3ab2282bbef7f70438b9c2857a8b854c4bde7f06db14b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp310-cp310-win_amd64.whl

Download URL dbhose_utils-0.0.2.5-cp310-cp310-win_amd64.whl
Size 56.9 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e9f22b36ec80f89822004ee0a180d46f0ca57026a5f10127326634de162e9f1a
BLAKE2b-256 checksum
How to use checksums
356dc2d5cb6c2b85730d0e25f1d6d548c762c802f1d3a2910a15ee96fe0bbe45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 318.3 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dcb9d4e5a80bd2fd9dc5d0ba31f45d2eadeaacaf25b2f058bb8264cfc571130a
BLAKE2b-256 checksum
How to use checksums
21390bd5db408d5b55a5d499d8262fcfb427996d2768dd1871f8604691117338
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp310-cp310-macosx_11_0_arm64.whl

Download URL dbhose_utils-0.0.2.5-cp310-cp310-macosx_11_0_arm64.whl
Size 60.2 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f7e503df07235f27ee2b8814d197aaf913c01cbd0ba330c82bcf688c699a5501
BLAKE2b-256 checksum
How to use checksums
c0bc928dd650f1108ee4577659c71d3cc194e40429229b0b9654d0c6c35953dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dbhose_utils-0.0.2.5-cp310-cp310-macosx_10_14_x86_64.whl

Download URL dbhose_utils-0.0.2.5-cp310-cp310-macosx_10_14_x86_64.whl
Size 66.4 kB
Tags CPython 3.10 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
160ba8b2d5144b718cb66172fafea938ced959e5e4541fbaa9dd1a4b4a5b2e07
BLAKE2b-256 checksum
How to use checksums
b410b6aa0f6663fb0b57581ea9d58de479fe06ae479e131c1fc3118347467a5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page