# Source Script Node (Table)

This node allows you to customize data extraction and manipulation then return data in tabular form to the following node.

Example: Read tabular data from a file (e.g., CSV) and return it as a table or structured data.

```javascript
var tableContent = FileUtil.readFile("d:\\tmp\\file.csv");
// Perform any required operations on the table
return tableContent;
```

#### Example: Retrieve data from API and return in Tabular format

<pre class="language-typescript"><code class="lang-typescript">// Retrieve exchange rates from the API
var request = HttpUtil.get("https://boi.org.il/PublicApi/GetExchangeRates");
var jsonContent = JsonUtil.parse(request.asString().getBody());
var exchanges = jsonContent.exchangeRates;

// Create a table to store the data
var table = SuiteTable.create("MyTable");
table.addStringColumn("key");
table.addDoubleColumn("rate");
table.addStringColumn("lastupdate");

// Populate the table with data from the API
for (var i = 0; i &#x3C; exchanges.size(); i++) {
    var item = exchanges[i];
    var key = item.key.asText();
    var rate = item.currentExchangeRate.asDouble();
    var date = item.lastUpdate.asText();
    
    var row = {
        "key": key,
        "rate": rate,
        "lastUpdate": date
    };
    

<strong>    table.addRow(row);
</strong>}

// Filter table with some type of selection example:
var selection = table.stringColumn("key").isEqualTo("USD");
var filteredTable = table.where(selection);

// Return the filtered table
return filteredTable;
</code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.b2winsuite.com/5.5/scripting/scripting-in-b2data/custom-script-nodes/source-script-node-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
