//name and rating are the field names in the dataProvider
and call it a day...
But that leaves you with evenly spaced columns and without any dynamic height of your grid, so you better resort to something like:
var nameCol:DataGridColumn=new DataGridColumn("name");
var ratingCol:DataGridColumn=new DataGridColumn("rating");
myGrid.columns = [nameCol, ratingCol];
which will let you size the columns at your will and have the component grow as you plug in more entries.