Discussion:
[pytables-users] ptrepack multiple tables?
Hei
2017-10-27 13:16:27 UTC
Permalink
Hi,

I have a HDF5 files that contains multiple tables, says, /A/B/980, /A/C/DEF
and /G, etc.

I would like to extract only /A/B/980, /A/C/DEF and /G into a new HDF5 file
and everything keeps the same (i.e. attributes, paths, indexes, etc).

I have tried to repack just one table:
ptrepack --keep-source-filters --propindexes my.h5:"/A/B/980"
test.h5:"/A/B/980"

and I got:
/usr/local/lib/python2.7/site-packages/tables/path.py:100:
NaturalNameWarning: object name is not a valid Python identifier: '980'; it
does not match the pattern ``^[a-zA-Z_][a-zA-Z0-9_]*$``; you will not be
able to use natural naming to access this object; using ``getattr()`` will
still work, though
NaturalNameWarning)

Is it something to worry about?

How to repack multiple tables? Not much hint on the help page:
http://www.pytables.org/usersguide/utilities.html

Thanks in advance.


Cheers,
Hei
--
You received this message because you are subscribed to the Google Groups "pytables-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytables-users+***@googlegroups.com.
To post to this group, send an email to pytables-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Francesc Alted
2017-10-27 15:23:01 UTC
Permalink
Hi Hei,
Post by Hei
Hi,
I have a HDF5 files that contains multiple tables, says, /A/B/980,
/A/C/DEF and /G, etc.
I would like to extract only /A/B/980, /A/C/DEF and /G into a new HDF5
file and everything keeps the same (i.e. attributes, paths, indexes, etc).
ptrepack --keep-source-filters --propindexes my.h5:"/A/B/980"
test.h5:"/A/B/980"
NaturalNameWarning: object name is not a valid Python identifier: '980'; it
does not match the pattern ``^[a-zA-Z_][a-zA-Z0-9_]*$``; you will not be
able to use natural naming to access this object; using ``getattr()`` will
still work, though
NaturalNameWarning)
Is it something to worry about?
​No, this is just a reminder telling that you will need to use `getattr()`
idiom (or `File.get_node()`) inside PyTables to retrieve​ the node.
Post by Hei
http://www.pytables.org/usersguide/utilities.html
​Currently you cannot specify multiple nodes for copying​, you will have to
do that separately. All the necessary steps are described in the ptrepack
tutorial (
http://www.pytables.org/usersguide/utilities.html#a-small-tutorial-on-ptrepack),
but basically it boils down to copy a single node per ptrepack invocation.

​Hope this helps,​
--
Francesc Alted
--
You received this message because you are subscribed to the Google Groups "pytables-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytables-users+***@googlegroups.com.
To post to this group, send an email to pytables-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hei Chan
2017-10-27 15:34:38 UTC
Permalink
Thanks!

Since I can't extract multiple nodes with ptrepack. Is there any tool to
combine multiple HDF5 files with different structures?

Thanks in advance.
Post by Francesc Alted
Hi Hei,
Post by Hei
Hi,
I have a HDF5 files that contains multiple tables, says, /A/B/980,
/A/C/DEF and /G, etc.
I would like to extract only /A/B/980, /A/C/DEF and /G into a new HDF5
file and everything keeps the same (i.e. attributes, paths, indexes, etc).
ptrepack --keep-source-filters --propindexes my.h5:"/A/B/980"
test.h5:"/A/B/980"
NaturalNameWarning: object name is not a valid Python identifier: '980'; it
does not match the pattern ``^[a-zA-Z_][a-zA-Z0-9_]*$``; you will not be
able to use natural naming to access this object; using ``getattr()`` will
still work, though
NaturalNameWarning)
Is it something to worry about?
​No, this is just a reminder telling that you will need to use `getattr()`
idiom (or `File.get_node()`) inside PyTables to retrieve​ the node.
Post by Hei
http://www.pytables.org/usersguide/utilities.html
​Currently you cannot specify multiple nodes for copying​, you will have
to do that separately. All the necessary steps are described in the
ptrepack tutorial (
http://www.pytables.org/usersguide/utilities.html#a-small-tutorial-on-ptrepack),
but basically it boils down to copy a single node per ptrepack invocation.
​Hope this helps,​
--
Francesc Alted
--
You received this message because you are subscribed to the Google Groups "pytables-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytables-users+***@googlegroups.com.
To post to this group, send an email to pytables-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...