asterixdb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malarout, Namrata (398M-Affiliate)" <Namrata.Malar...@jpl.nasa.gov>
Subject Re: Primary key in a nested document structure
Date Mon, 14 Sep 2015 21:13:57 GMT
Hi Ian,
Thanks for your quick response. I am actually converting NetCDF files into
a JSON format for ingestion. I¹m attaching the raw JSON output of one
file. It¹d be easier to understand the structure of a single object from
the file.
I am using AsterixDB for the first time. So any suggestions or advice
about how to design the schema are welcome.
Thanks,
Namrata


On 9/14/15, 2:01 PM, "Ian Maxon" <imaxon@uci.edu> wrote:

>Hi Namrata,
>First, I would say that the one feature it seems like you will need is
>indexing on nested datatypes, which is only supported in the upcoming
>release. That's coming very soon, maybe in the next week or so.
>Therefore, you can either hold tight for the final release, or try it
>now as version 0.8.7-SNAPSHOT
>(https://asterixdb.incubator.apache.org/download.html). The nested
>indexing is relatively final so I wouldn't expect any major changes
>between that version and the release for this use case.
>
>Second, I'm a little confused on the formatting and layout of the
>data. In AsterixDB, usually datasets are collections of instances of
>JSON/ADM objects. Is what we have here a collection of GlobL4Type
>objects? If you could subset and give an instance of one of the
>rows/objects here, it'd be very helpful.
>
>Thanks!
>- Ian
>
>On Mon, Sep 14, 2015 at 1:43 PM, Malarout, Namrata (398M-Affiliate)
><Namrata.Malarout@jpl.nasa.gov> wrote:
>> Hi all,
>> The data I am working with has a nested structure. This is what my
>>schema
>> looks like:
>>
>>
>> drop dataverse TestL4 if exists;
>>
>> create dataverse TestL4;
>>
>> use dataverse TestL4;
>>
>>
>> create type type_dimensions as closed {
>>
>> time: int32,
>>
>> lat: int32,
>>
>> lon: int32
>>
>> }
>>
>> create type attributes_tll as open {
>>
>> long_name: string,
>>
>> standard_name: string,
>>
>> units: string,
>>
>> valid_min: float,
>>
>> valid_max: float,
>>
>> axis: string,
>>
>> comment: string
>>
>> }
>>
>> create type type_tll as open {
>>
>> typee: string,
>>
>> dimensions: {{string}},
>>
>> attributes: [attributes_tll]
>>
>> }
>>
>> create type type_globattr as open {
>>
>> title: string,
>>
>> id: string,
>>
>> uuid: string
>>
>> }
>>
>> create type type_var as open {
>>
>> time: type_tll,
>>
>> lat: type_tll,
>>
>> lon: type_tll
>>
>> }
>>
>> create type GlobL4Type as open {
>>
>> dimensions: [type_dimensions],
>>
>> variables: [type_var],
>>
>> global_attributes: [type_globattr]
>>
>> }
>>
>>
>> Type GlobL4Type is the structure of the document. So I want to create a
>> dataset based on it. I would like to use Œid¹ present in type_globattr
>>as
>> the primary key for every document. How can I do that?
>> Thanks in advance for the help.
>>
>> Regards,
>> Namrata Malarout


Mime
View raw message