I'm writing a data source using the Google Java data source library. I
have run into a strange problem with column identifiers. My data table
consists of a column of DATETIME values, followed by two columns of
NUMBER values. If the identifier for the DATETIME column is
"timestamp", "timeStamp", "dateTime" and a few other things I tried,
any select query I make using that column identifier returns a big
error message. The raw JSON output is reproduced below (hopefully
Google Groups doesn't mangle it):
If use "foo", "thyme", or "dayte" or other identifiers for that
column, everything works fine. Are there are some reserved identifiers
that we should avoid using, or is this just a bug? It's easy enough to
work around this problem by picking another name, but the above error
message doesn't exactly scream out 'change your identifier name'. If
there are reserved identifiers we should avoid, a list of them would
be nice.
I should mention that I'm quite the Javascript newbie, so if this is
something that should be obvious if you know Javascript, then I
apologize. However, this processing is happening inside the Java
library before it even gets interpreted by the browser, so I'm not
sure how Javascript would come into the picture.
There are many reserved identifiers in the google query language. If
you want to use one of them as the name of a field, you have to quote
it with backticks in your queries: `datetime`, for example. But better
to just avoid them, in my opinion...
Mark
On Sep 29, 11:36 pm, Robert Brewer <rbre...@lava.net> wrote:
> I'm writing a data source using the Google Java data source library. I
> have run into a strange problem with column identifiers. My data table
> consists of a column of DATETIME values, followed by two columns of
> NUMBER values. If the identifier for the DATETIME column is
> "timestamp", "timeStamp", "dateTime" and a few other things I tried,
> any select query I make using that column identifier returns a big
> error message. The raw JSON output is reproduced below (hopefully
> Google Groups doesn't mangle it):
> If use "foo", "thyme", or "dayte" or other identifiers for that
> column, everything works fine. Are there are some reserved identifiers
> that we should avoid using, or is this just a bug? It's easy enough to
> work around this problem by picking another name, but the above error
> message doesn't exactly scream out 'change your identifier name'. If
> there are reserved identifiers we should avoid, a list of them would
> be nice.
> I should mention that I'm quite the Javascript newbie, so if this is
> something that should be obvious if you know Javascript, then I
> apologize. However, this processing is happening inside the Java
> library before it even gets interpreted by the browser, so I'm not
> sure how Javascript would come into the picture.
On Sep 30, 4:13 am, Markw65 <mark...@gmail.com> wrote:
> There are many reserved identifiers in the google query language. If
> you want to use one of them as the name of a field, you have to quote
> it with backticks in your queries: `datetime`, for example. But better
> to just avoid them, in my opinion...
> Mark
I see that I needed to RTFM. I never made it to the bottom of the
query language reference web page, which has a clearly labeled list of
reserved words, of which "timestamp" is one: