Branko-Dj on master
[travis][s]: Added update comma… (compare)
@ZviBaratz Ultimately I believe the data is being stored on AWS in some S3 storage buckets. A single data package can contain many different resources. If it is a tabular data package, containing tabular data resources, those resources can contain references to each other (primary/foreign key relationships as in a database). If you're using a basic data package (not the more specialized tabular data package) which can contain arbitrary kinds of data resources, I guess one of those resources could itself be a data package. But I don't think this is the intended arrangement.
That’s right @zaneselvans :smile:
@zaneselvans If I have many tens of thousands of files, wouldn't that become a problem to manage using JSON? I am working with MRI data, which in its raw format is delivered as DICOM files. Each subject may have a few thousands of those created at a full scanning session.
@ZviBaratz that should be fine. One question: are all these files different resources in one package or ...
There is the NIfTI format, which is often used to share MRI data (there's a whole specification just for that called BIDS). The problem is that I am looking for a way to not only publish the data but also maintain a database of references, so that the querying, extraction, and piping of data is facilitated.
This is a really interesting use case - please tell us more. When you say a database of references what exactly do you mean?
@rufuspollock I mean a database that keeps references to that actual files. Some fields from the header that might be relevant to data aggregation in analyses etc. can also be saved for easy querying, but once you want the data itself (pixel data or a header field that's not included in the database schema), you have to read it from the DICOM file.
Sorry for the slow reply @ZviBaratz!
To answer your question I think you could a) pull out metadata and save into datapackage.json b) i’m understanding that you want to do specific post-processing on the data e.g. to generate all of the info for a particular scan. I’d be doing that with a separate workflow after storing the basic packages.
@akariv , I have been looking through the dataflow tutorials that use custom functions and nested flows trying to figure out how I can use custom functions for one resource when there are many.
For example, I have a row processor:
What I want to do is this in a flow specifying one resource:
mycustomfcn(resouces='mclane_log') and be able to specify whether it is a package, row, or rows processor somehow.
I can also do stuff directly in the flow like this but again, I can't figure out how to specify one resource if there are many.
lambda row: dict(row, val=row['val']/5),
def mycustomfcn(package): yield package.pkg resources = iter(package) for resource in resources: if resource.name == 'my-resource-name': # do stuff here Eg: yield filter(lambda row: (row['x'] in [1,2,3,4,5]), resource) else: # Deque others yield resource