Large Table Handling

BeakerX table widget protects itself against tables with too many rows or columns. The interactive preview is not intended for large datasets. Here's how these situations are handled.

Too Many Rows

There is a limit of 10,000 rows. Longer tables show a warning and an interactive preview of the first 1000 rows. The following cell shows what happens if you by accident return a million rows to the client.

In [ ]:
ArrayList list = new ArrayList();
for(int i = 0 ; i< 1000000 ; i++){
  list.add([a:i, b:i+1, c:i+i])  
}
def display = new TableDisplay(list);
display

Too Many Columns

There is a limit of 50 columns. If there are more, then the extras are hidden and you get a UI to make your own column selection, with search.

In [ ]:
ArrayList rowList = new ArrayList();
for(int row = 0 ; row< 10 ; row++){
    HashMap colMap = new HashMap();
    for(int col = 0 ; col< 1006; col++){
     colMap.put('a' + col, 'b' + col); 
    }
    rowList.add(colMap);
}
def display = new TableDisplay(rowList);
display
In [ ]:
display = new TableDisplay(new CSV().read("../resources/data/interest-rates.csv"))
display

Very Wide Cells

The width of a cell is limited to 1000 characters. If a cell goes past that, it will be truncated with a '...' appended to the end.

In [ ]:
display = new TableDisplay(new CSV().read("../resources/data/long_lines.csv"))
display
In [ ]: