> For the complete documentation index, see [llms.txt](https://docs.redivis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redivis.com/api/client-libraries/redivis-r/reference/table/tableusdto_sf_tibble.md).

# Table$to\_sf\_tibble

### Table$<mark style="color:purple;">to\_sf\_tibble</mark>(max\_results=NULL, variables=NULL, geography\_variable=NULL, batch\_preprocessor=NULL, max\_parallelization=parallely::availableCores()) → [SF tibble](https://r-spatial.github.io/sf/index.html)

Returns a [Simple Features tibble](https://r-spatial.github.io/sf/index.html) representing a table with a geography variable.

{% hint style="info" %}
Also callable on [Queries](/api/client-libraries/redivis-r/reference/query.md) and [Uploads](/api/client-libraries/redivis-r/reference/upload.md) →  `query$to_sf_tibble(...)` | `upload$to_sf_tibble(...)`
{% endhint %}

### **Parameters:**

**`max_results` :&#x20;*****int, default NULL***\
The max number of records to load into the tibble. If not specified, the entire table will be loaded.

**`variables` :&#x20;*****list(str)*****&#x20;|&#x20;*****character vector*** \
The specific variables to return, e.g., `variables = c("name", "date")` . If not specified, all variables in the table will be returned.

**`geography_variable` :&#x20;*****str, default NULL*** \
The variable to use as the sf geometry column. If unset, the first geography variable in the tibble will be used.

**`batch_preprocessor` :&#x20;*****function, default NULL***\
Function used to preprocess the data, invoked for each batch of records as they are initially loaded. This can be helpful in reducing the size of the data before the final table is loaded. The function accepts one argument, an [Arrow RecordBatch](https://arrow.apache.org/docs/dev/r/reference/RecordBatch.html), and must return a Arrow RecordBatch or `NULL`. If you prefer to work with the data solely in a streaming manner, see [`Table$to_arrow_batch_reader()`](/api/client-libraries/redivis-r/reference/table/tableusdto_arrow_batch_reader.md)

**`max_parallelization` :&#x20;*****int, default parallely::availableCores()***\
The maximum parallelization when loading the table. Uses the `future::multicore` strategy when supported, falling back to `future::multisession` if not.

### **Returns:**&#x20;

[**sf tibble**](https://r-spatial.github.io/sf/index.html)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.redivis.com/api/client-libraries/redivis-r/reference/table/tableusdto_sf_tibble.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
