You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@asterixdb.apache.org by ghulam rabbani <ra...@gmail.com> on 2019/08/08 09:25:31 UTC

Query regarding Asterix DB

Hi Team,

Is there any way to autogenerate numeric value in the dataset . I am having
these use cases- but according to doc, I can only generate the value from
UUID; Please let me know if you want any additional information.

-- 

*Thanks & Regards*

*Ghulam Rabbani*

*+91-9051457429 | rabbanitauf@gmail.com <ra...@gmail.com>*

Re: Query regarding Asterix DB

Posted by Ali Alsuliman <al...@gmail.com>.
Hi Ghulam,

1. Autogenerating numeric values is not supported, yet.
2. If I understand your question correctly, it is doable. Here is an
example:

CREATE TYPE MyType AS {
 f1:      string,
 f2:      string,
 f3:      uuid
};

create dataset ds(MyType) primary key f1;

insert into ds {"f1": "str1", "f2": "str2", "f3": uuid()};

select value x from ds x;

Thanks
Ali

On Mon, Aug 12, 2019 at 3:46 PM Ali Alsuliman <al...@gmail.com>
wrote:

> Hi Ghulam,
>
> 1. Autogenerating numeric values is not supported, yet.
> 2. If I understand your question correctly, it is doable. Here is an
> example:
>
> CREATE TYPE MyType AS {
>  f1:      string,
>  f2:      string,
>  f3:      uuid
> };
>
> create dataset ds(MyType) primary key f1;
>
> insert into ds {"f1": "str1", "f2": "str2", "f3": uuid()};
>
> select value x from ds x;
>
> Thanks
> Ali
>
> On Thu, Aug 8, 2019 at 8:25 AM ghulam rabbani <ra...@gmail.com>
> wrote:
>
>> One more query-
>>
>> Is there a way to use one field as autogenerated and another field as the
>> primary key?
>>
>>
>> On Thu, Aug 8, 2019 at 2:55 PM ghulam rabbani <ra...@gmail.com>
>> wrote:
>>
>> >
>> > Hi Team,
>> >
>> > Is there any way to autogenerate numeric value in the dataset . I am
>> > having these use cases- but according to doc, I can only generate the
>> value
>> > from UUID; Please let me know if you want any additional information.
>> >
>> > --
>> >
>> > *Thanks & Regards*
>> >
>> > *Ghulam Rabbani*
>> >
>> > *+91-9051457429 | rabbanitauf@gmail.com <ra...@gmail.com>*
>> >
>>
>>
>> --
>>
>> *Thanks & Regards*
>>
>> *Ghulam Rabbani*
>>
>> *+91-9051457429 | rabbanitauf@gmail.com <ra...@gmail.com>*
>>
>
>
> --
> Regards,
>


-- 
Regards,

Re: Query regarding Asterix DB

Posted by Ali Alsuliman <al...@gmail.com>.
Hi Ghulam,

1. Autogenerating numeric values is not supported, yet.
2. If I understand your question correctly, it is doable. Here is an
example:

CREATE TYPE MyType AS {
 f1:      string,
 f2:      string,
 f3:      uuid
};

create dataset ds(MyType) primary key f1;

insert into ds {"f1": "str1", "f2": "str2", "f3": uuid()};

select value x from ds x;

Thanks
Ali

On Thu, Aug 8, 2019 at 8:25 AM ghulam rabbani <ra...@gmail.com> wrote:

> One more query-
>
> Is there a way to use one field as autogenerated and another field as the
> primary key?
>
>
> On Thu, Aug 8, 2019 at 2:55 PM ghulam rabbani <ra...@gmail.com>
> wrote:
>
> >
> > Hi Team,
> >
> > Is there any way to autogenerate numeric value in the dataset . I am
> > having these use cases- but according to doc, I can only generate the
> value
> > from UUID; Please let me know if you want any additional information.
> >
> > --
> >
> > *Thanks & Regards*
> >
> > *Ghulam Rabbani*
> >
> > *+91-9051457429 | rabbanitauf@gmail.com <ra...@gmail.com>*
> >
>
>
> --
>
> *Thanks & Regards*
>
> *Ghulam Rabbani*
>
> *+91-9051457429 | rabbanitauf@gmail.com <ra...@gmail.com>*
>


-- 
Regards,

Re: Query regarding Asterix DB

Posted by ghulam rabbani <ra...@gmail.com>.
One more query-

Is there a way to use one field as autogenerated and another field as the
primary key?


On Thu, Aug 8, 2019 at 2:55 PM ghulam rabbani <ra...@gmail.com> wrote:

>
> Hi Team,
>
> Is there any way to autogenerate numeric value in the dataset . I am
> having these use cases- but according to doc, I can only generate the value
> from UUID; Please let me know if you want any additional information.
>
> --
>
> *Thanks & Regards*
>
> *Ghulam Rabbani*
>
> *+91-9051457429 | rabbanitauf@gmail.com <ra...@gmail.com>*
>


-- 

*Thanks & Regards*

*Ghulam Rabbani*

*+91-9051457429 | rabbanitauf@gmail.com <ra...@gmail.com>*