If you need to work with data grids in DS2 as part of an RTDM decision campaign, you'll need to have an input parameter of type "package tap_table" in your execute() method. The tap_table method has a number of methods to allow you to get row count, add/remove rows, get values from the specified row/column, etc. These are all documented on page 102 of the RTDM Admin Guide.
Keep in mind that there are also lots of calcualted functions you can use in your campaign itself to do things like:
- Sort the data grid
- Select rows with values that match your criteria
- Select the top or bottom N rows from a data grid
- Join the data grid with another data grid
- Get the max, min, average, etc. for the specific column
These are documented on page 265 of the RTDM User Guide.
If you've retrieved the data grid via a data process, you can also directly reference any of the columns, or you can add a data grid identifier to define column names to reference as well.