Great News that the API works with ANY data source, but how?

33 views
Skip to first unread message

Paul

unread,
Nov 3, 2008, 3:45:24 PM11/3/08
to Google Visualization API
Hello All,

Great News that the Google Visualization API support any data source,
but I am stuck at this part of the documentation.

"To send a request, you would create a Query object, specify a URL for
the data source (this URL should indicate what data is being
requested, in a syntax understood by that data source), optionally add
a query language string to sort or filter the results, and then send
the request."

What would an URL for a sql server 2005 database look like? I assume
that such an URL is more than just a connection string since it
returns a DataTable. I have been googling for an answer but unable to
find anything. Can anyone lead me in the right direction?

Thanks,

Paul

Dan Brickley

unread,
Nov 3, 2008, 4:02:19 PM11/3/08
to google-visua...@googlegroups.com

Yep I've been trying to figure out what's new in the documentation too.

The blog links to this ...

http://code.google.com/apis/visualization/documentation/dev/implementing_data_source.html

...but the link is fairly subtle.

JSON response format is here:

http://code.google.com/apis/visualization/documentation/dev/implementing_data_source.html#jsondatatable

cheers,

Dan

--
http://danbri.org/

VizGuy

unread,
Nov 3, 2008, 6:21:08 PM11/3/08
to google-visua...@googlegroups.com
Hi,

The essence of our announcement today is that we documented our protocol, or 'opened' it up. We now enable both from a terms of service and from a practical perspective to create Visualization compliant data sources.

The results is that anybody can expose their data in this format, and so visualize their data with visualizations supporting the API.

That said, you still need to actually expose the data to be visualized in the protocol.

There are two ways you can do this:

 - You can create a data source. This means that you will have a url that can accept HTTP requests and return the JSON response as described here.
If you take this approach, you can send requests to this data source by pointing to this url from the Query object. See more here.

 - You can use the JSON notation in the DataTable object constructor. This way, you generate the page on the server, including the data table to be visualized on the page. You don't have to follow the full protocol of request and response, but only follow the JSON notation of DataTable, described here. Note that in this case there is no way to specify this as a data source url, and so it can't be used in gadgets, for example.

The main point is that other than the Python library implementation, we have exposed the protocol to enable you to connect your data sources (as described in the two options above) but we have not provided actual implementations of these. While we do intend to make connecting to generally available data sources in the future easier, it is up to the community (you) to do the implementations for data sources (be it general ones, like an implementation for SQL data for example, or specific ones for your own application). 

If you want, you can share these implementations with the community (you can freely share them or you can also create a business model around that if you wish). We intend to make it easy to find general implementations of data sources by creating a gallery similar to the visualization and gadget gallery. If you're so fast as to create such an implementation before we place the data sources gallery on the docs, feel free to shoot us a note on this group.

Hope this helps.

Chad Morris

unread,
Nov 3, 2008, 8:04:39 PM11/3/08
to Google Visualization API
Hi,
I'd like to announce that the mc-goog-visualization PHP library
(http://code.google.com/p/mc-goog-visualization/) now supports version
0.5 of the datasource protocol. This library lets you expose
controlled parts of a MySQL, Postgres, or SQLite database to
visualizations using the standard Google Visualization Query
Language. At this time, only the JSON output format is supported,
though patches are welcome for additional output formats or database
engines. We're currently using this code in production at
http://www.mailchimp.com, so it's stable enough to be used, but your
mileage may vary.

Let me know what you guys think!

Chad Morris

On Nov 3, 6:21 pm, VizGuy <viz...@google.com> wrote:
> Hi,
> The essence of our announcement today is that we documented our protocol, or
> 'opened' it up. We now enable both from a terms of service and from a
> practical perspective to create Visualization compliant data sources.
>
> The results is that anybody can expose their data in this format, and so
> visualize their data with visualizations supporting the API.
>
> That said, you still need to actually expose the data to be visualized in
> the protocol.
>
> There are two ways you can do this:
>
>  - You can create a data source. This means that you will have a url that
> can accept HTTP requests and return the JSON response as described
> here<http://code.google.com/apis/visualization/documentation/dev/implement...>
> .
> If you take this approach, you can send requests to this data source by
> pointing to this url from the Query object. See more
> here<http://code.google.com/apis/visualization/documentation/queries.html>
> .
>
>  - You can use the JSON notation in the DataTable object constructor. This
> way, you generate the page on the server, including the data table to be
> visualized on the page. You don't have to follow the full protocol of
> request and response, but only follow the JSON notation of DataTable,
> described here<http://code.google.com/apis/visualization/documentation/reference.htm...>.
> Note that in this case there is no way to specify this as a data source url,
> and so it can't be used in gadgets, for example.
>
> The main point is that other than the Python library implementation, we have
> exposed the protocol to enable you to connect your data sources (as
> described in the two options above) but we have not provided actual
> implementations of these. While we do intend to make connecting to generally
> available data sources in the future easier, it is up to the community (you)
> to do the implementations for data sources (be it general ones, like an
> implementation for SQL data for example, or specific ones for your own
> application).
>
> If you want, you can share these implementations with the community (you can
> freely share them or you can also create a business model around that if you
> wish). We intend to make it easy to find general implementations of data
> sources by creating a gallery similar to the visualization and gadget
> gallery. If you're so fast as to create such an implementation before we
> place the data sources gallery on the docs, feel free to shoot us a note on
> this group.
>
> Hope this helps.
>
Reply all
Reply to author
Forward
0 new messages