Dear all,

Sorry, I overlooked the "built-in functions" page completely. There is my 
answer...

All the best,
Ingo


> -----Original Message-----
> From: Müller Ingo
> Sent: Saturday, September 19, 2020 1:53 AM
> To: '[email protected]' <[email protected]>
> Subject: Testing for a type in SQL++
> 
> Dear AsterixDB team,
> 
> 
> 
> I am trying to query a heterogeneous data set with AsterixDB and can't figure
> out how to deal with mixed types.
> 
> 
> 
> I am using data from the Github Archive (https://www.gharchive.org/ ). The 
> data
> set doesn't have a schema, so I just used "CREATE TYPE t1 AS OPEN {};" Now I
> want to query "SELECT actor.login FROM github", but I get "ASX0037: Type
> mismatch: expected value of type object, but got the value of type string" 
> This is
> because, even though most "actor" fields in the top-level objects are 
> themselves
> objects, some are just strings.
> 
> 
> 
> How should I deal with that? I can't seem to find a way to check for the type 
> in
> order to filter out non-objects. What else should I do?
> 
> 
> 
> Thanks a lot in advance,
> 
> Ingo

Reply via email to