Closed eggio closed 3 years ago
Hi @eggio. You can currently add filters to the converter after it has been generated (see following comment). I am planning on adding a default attribute filter to the add_array_creator
and add_array_converter
methods in the NetCDF4ConverterEngine
. I can also add the ability to set default attribute, dimension, and offset filters in the from_file
and from_group
methods in the NetCDF4ConverterEngine
. Would that satisfy this feature request?
Examples below show how to set filters for the TileDB arrays generated from the NetCDF4ConverterEngine
. It assumes filter_list
is a FilterList object. For example,
filter_list = tiledb.FilterList([tiledb.ZstdFilter(level=7)])
for array_creator in converter.array_creators():
for attr_creator in array_creator:
attr_creator.filters = filter_list
for array_creator in converter.array_creators():
array_creator.coords_filters = filter_list
for array_creator in converter.array_creators():
array_creator.offsets_filters = filter_list
converter.get_array_creator("array_name").attr_creator("attr_name").filters = filter_list
converter.get_array_creator("array_name").domain_creator.dim_creator("dim_name").filters = filter_list
converter.get_array_creator("array_name").offsets_filters = filter_list
Thanks alot! Sorry for creating an Issue but i couldn't find it anywhere how to do it. I don't mind if you delete it.
Adding the option to a add tileDB filters (https://tiledb-inc-tiledb.readthedocs-hosted.com/en/1.6.3/tutorials/filters.html), exspecially compression to the converter.