asterixdb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wail Alkowaileet <wael....@gmail.com>
Subject Re: Unusable asterix instance and setting unique primary key
Date Wed, 16 Mar 2016 12:39:12 GMT
Answers inlined.



On Wed, Mar 16, 2016 at 12:14 PM, Magnus Kongshem <kongshem@online.ntnu.no>
wrote:

> Hey,
>
> Im testing AsterixDB for my master thesis and I have some issues.
>
> First, all of the sudden, my asterix instance became unusable. I have
> tried to delete it to create a new one, but I am not allowed. How do one
> solve this?
>
> This can be a misleading message. If your queries work, you shouldn't be
worry about it.


> Second, I have a data set with no unique primary key. I understood on
> Heri, one of the developers, that there is an option for generating a
> unique primary key, but I can't find it anywhere in the documentation. Can
> someone point me in the right direction?
>
> create type eleType as closed{
b: int32,
c: int32
}
create type jsonType as open{
id: uuid,
a: [eleType]
}

create dataset json(jsonType)
primary key id *autogenerated*;



> Last, I am using the REST API to access the instance and perform queries
> on it. But I am having issues with the url string encoder. When I write a
> query and try to encode it to UTF-8 I get a different url string than what
> is accepted by Asterix. Example below:
>
> This is an example query I want to perform:
> "query=use dataverse bigd;count(for $l in dataset('posdata') return $l);"
>
> This is the query when UTF-8 encoded:
>
> "query%3Duse+dataverse+bigd%3Bcount%28for+%24l+in+dataset%28%27posdata%27%29+return+%24l%29%3B"
>
> This is what AsterixDB accepts:
>
> "query=use%20dataverse%20bigd;count(for%20$l%20in%20dataset(%27posdata%27)%20return%20$l);"
>
> Why is there a difference between what AsterixDB accepts and the standard
> UTF-8 encoding? I'm using java and URLEncoder to encode the URL.
>
> URLEncoder.encode(query, "UTF-8")
>
> Maybe someone else better explains this .. But I would suggest using
Apache HttpComponents: https://hc.apache.org/ .

> Thanks in advance
>
> --
>
> Mvh
>
> Magnus Alderslyst Kongshem
> +47 415 65 906
>



-- 

*Regards,*
Wail Alkowaileet

Mime
View raw message