Create and publish tableau hyper files from parquet files.
Project description
Parquet to Hyper
Package to convert parquet files into a single hyper file.
Benchmarking
To be announced soon.
How to use
Installation
pip install parquet-to-hyper
Initializing object
from packages.hyper_file import HyperFile
parquet_folder = '/path/to/your/folder' # The folder where the parquet files are
parquet_extension = 'parquet' # Optional. Don't use it if the parquet files has no extension
hf = HyperFile(parquet_folder, parquet_extension)
Create a single file
hyper_filename = 'path/to/your/db.hyper' # Path to save hyper file with filename
rows = hf.create_hyper_file(hyper_file_name)
print(f'Hyper created with {rows} rows.')
Deleting rows from an existing hyper file
This function deletes rows based on a control column (date column) and the days to delete from current day.
hyper_filename = 'path/to/your/db.hyper' # Path to load hyper file with filename
control_column = 'date_column'
days = 7
hf.delete_rows(hyper_filename)
print(f'{rows} rows were deleted.')
Appending rows from parquet into an existing hyper file
hyper_filename = 'path/to/your/db.hyper' # Path to load hyper file with filename
rows = hf.append_rows(hyper_filename)
print(f'{rows} were appended.')
Publishing hyper file into Tableau server
from packages.hyper_file import HyperFile
tsu = TableauServerUtils(tableau_address, token_name, token_value)
project_id = tsu.get_project_id(project_name)
tsu.publish_hyper(project_id, 'test.hyper')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
parquet-to-hyper-1.1.1.tar.gz
(46.2 kB
view hashes)
Built Distribution
Close
Hashes for parquet_to_hyper-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e55d30ec3230f454225dda2768b9d5c09cd4d9916e57b6c2e43a9e755801b30 |
|
MD5 | 311d46c607f9dd576da517da84c22a8c |
|
BLAKE2b-256 | e9b24c38e4a582e4be9051696ba2964d3e4e0d161edf29605bac0506157df300 |