The constructor for DataTable takes the following arguments:
1. A reference to a container that will hold the DataTable, either by its
id
or a DOM reference2. The column definitions that define the data to be shown and how it will be presented
3. The instance of DataSource that will retrieve the data
4. An optional object containing configuration attributes
The first argument can be any container in the page. Contrary to other controls we've seen previously, the DataTable is unable to read existing markup from the page. It is the DataSource that can read HTML tables so, in a way, the container referenced in the first argument may contain markup, but it will reach the DataTable via a roundabout route, through the DataSource. The DataTable will completely obliterate any previous contents of the container so, in a way, the effect is pretty much the same.
For our example, we'll read another of the YQL tables via this query:
select abstract, date, width, height, thumbnail_url...