Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Reserved column identifiers in Java data source library?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Robert Brewer  
View profile  
 More options Sep 30, 2:36 am
From: Robert Brewer <rbre...@lava.net>
Date: Tue, 29 Sep 2009 23:36:13 -0700 (PDT)
Local: Wed, Sep 30 2009 2:36 am
Subject: Reserved column identifiers in Java data source library?
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):

google.visualization.Query.setResponse
({version:'0.6',status:'error',errors:
[{reason:'invalid_query',message:'Invalid
query',detailed_message:'Query error: Encountered \u0022 \u0022,\u0022
\u0022, \u0022\u0022 at line 1, column 16.\nWas expecting one of:\n
\u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL\u003e ...
\n    \u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL
\u003e ...\n    \u003cSTRING_LITERAL\u003e ...\n
\u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL\u003e ...
\n    \u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL
\u003e ...\n    \u003cSTRING_LITERAL\u003e ...\n
\u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL\u003e ...
\n    \u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL
\u003e ...\n    \u003cSTRING_LITERAL\u003e ...\n
\u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL\u003e ...
\n    \u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL
\u003e ...\n    \u003cSTRING_LITERAL\u003e ...\n
\u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL\u003e ...
\n    \u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL
\u003e ...\n    \u003cSTRING_LITERAL\u003e ...\n
\u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL\u003e ...
\n    \u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL
\u003e ...\n    \u003cSTRING_LITERAL\u003e ...\n
\u003cSTRING_LITERAL\u003e ...\n    \u003cSTRING_LITERAL\u003e ...
\n    \u003cSTRING_LITERAL\u003e ...\n    '}]});

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.

Mahalo!

--
Robert Brewer                         http://excitedcuriosity.wordpress.com
PhD Student, University of Hawaii at Manoa, Computer Science Dept
Research Assistant in Renewable Energy and Island Sustainability
                         http://reis.manoa.hawaii.edu


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Markw65  
View profile  
 More options Sep 30, 10:13 am
From: Markw65 <mark...@gmail.com>
Date: Wed, 30 Sep 2009 07:13:47 -0700 (PDT)
Local: Wed, Sep 30 2009 10:13 am
Subject: Re: Reserved column identifiers in Java data source library?
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:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Brewer  
View profile  
 More options Sep 30, 10:06 pm
From: Robert Brewer <rbre...@lava.net>
Date: Wed, 30 Sep 2009 19:06:28 -0700 (PDT)
Local: Wed, Sep 30 2009 10:06 pm
Subject: Re: Reserved column identifiers in Java data source library?
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:

http://code.google.com/apis/visualization/documentation/querylanguage...

My bad. Still, I think an error message like "reserved word used as
column identifier" would be appropriate, rather than many lines of
gobbledegook.

--
Robert Brewer                         http://excitedcuriosity.wordpress.com
PhD Student, University of Hawaii at Manoa, Computer Science Dept
Research Assistant in Renewable Energy and Island Sustainability
                         http://reis.manoa.hawaii.edu


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google