Anthony,

How would you put a hard link to an array in a table as you mentioned below. I 
have tried to come up with a nice way to do this in the past and have not been 
able to do it. I've alway had to use a StringCol() where I stored an internal 
path to the dataset. I would then have to read the path and retrieve the 
dataset. Is it possible to store a hard link and have it directly return the 
dataset upon accessing the column?

-Mike

Message: 3
Date: Wed, 22 Jun 2011 20:10:57 -0500
From: Anthony Scopatz <scop...@gmail.com>
Subject: Re: [Pytables-users] Variable length arrays for each row in a
        table
To: Discussion list for PyTables
        <pytables-users@lists.sourceforge.net>
Message-ID: <BANLkTinjT-GLZ6PsQNeGv9R8wcTAJG=d...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Jason,

Upon further inspection, I think that this comes down to a spelling issue.

Really, what you want is a VL structure inside of a table.  Tables are
themselves
VL structures and have been special cased to nest themselves.  This could
be
changed to allow more general VL structures to be nested, but that would
require
a good amount of effort (that I sadly don't have time for now).

But really the only thing that you are doing when you nest a table within a
table
rather than nesting a vlarray in a table is that you are providing *extra*
information.
This isn't really a bad thing, and gets to what I mean by spelling.

Nesting a table in a table you have,

desc = {'A': Float64Col, 'B': {'C': Int32Col}}


Nesting a vlarry inside of a column would presumably be

desc = {'A': Float64Col, 'B': VLArrayCol(atom=Int32Col)}


Unfortunately, the VLArrayCol object doesn't exist.  The reason it doesn't
I suspect is because of how you would spell the path to the nested data.
In nested tables you use the column names:

t['B/C']

In nested vlarrays, you'd have to use the index, which is weird.

t['B/0'], t['B/1'], t['B/2'], ...

Nested tables are everything you want, plus a tiny bit more in terms of
having to
name the dimension you want to be variable.

It should be noted that you end up with the same weird spelling issues in
numpy
structured arrays, which similarly disallow such funny business.

Of course, as Dav mentions, there are other options.  Store your VLArrays
outside of
the table, then link to them in the table either through path or hard links,
etc.

At the end of the day I would still suggest the table in a table idea.  It
isn't that much
extra work, and on the HDF5 level it is exactly what you want.

Be Well
Anthony
</pre>The contents of this electronic mail message and any attachments are 
confidential, possibly privileged and intended for the addressee(s) 
only.<br>Only the addressee(s) may read, disseminate, retain or otherwise use 
this message. If received in error, please immediately inform the sender and 
then delete this message without disclosing its contents to anyone.</pre>

<<winmail.dat>>

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to