# Parsers

Components to process data from an external format, such as WKT or GeoJSON, into a table format including the processed geographies/geometries in a column when applicable.

## Draw Custom Features

**Description**

This component allows drawing new custom geospatial features.

By clicking on "*Draw features*" you will be able to use a point and click UI to define custom features (points, lines or polygons) that will be used to generate a GeoJSON string.

{% hint style="info" %}
The GeoJSON input can also be provided via a **Geo variable** using expression syntax `{{@geo_variable_name}}`. This is useful in [Viewer Mode](/carto-user-manual/workflows/viewer-mode.md), where viewers can draw features that are passed to this component as a parameter. Learn more about [Geo variables](/carto-user-manual/workflows/using-variables-in-workflows.md).
{% endhint %}

**Inputs**

* `GeoJSON string [String]`

**Outputs**

* `Result table [Table]`

## ST as GeoJSON

**Description**

This component generates a new column with the GeoJSON representation of geographies in another column.

**Inputs**

* `Source table [Table]`
* `Column with geographies definition [Column]`

**Outputs**

* `Result table [Table]`

**External links**

[BigQuery reference](https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_asgeojson)

[Snowflake reference](https://docs.snowflake.com/en/sql-reference/functions/st_asgeojson)

[Redshift reference](https://docs.aws.amazon.com/redshift/latest/dg/ST_AsGeoJSON-function.html)

[PostgreSQL reference](https://postgis.net/docs/ST_AsGeoJSON.html)

## ST as Text

**Description**

This component generates a new column with the WKT representation of geographies in another column.

#### Inputs

* `Source table [Table]`
* `Column with geographies definition [Column]`

**Outputs**

* `Result table [Table]`

**External links**

[BigQuery reference](https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_astext)

[Snowflake reference](https://docs.snowflake.com/en/sql-reference/functions/st_aswkt)

[Redshift reference](https://docs.aws.amazon.com/redshift/latest/dg/ST_AsText-function.html)

[PostgreSQL reference](https://postgis.net/docs/ST_AsText.html)

## ST Geog from Text

**Description**

This component creates a new column with geometries created from the values in another column. This column can contain geometries defined in both WKT or GeoJSON format.

**Inputs**

* `Source table [Table]`
* `Text column with geography definition [Column]`

**Outputs**

* `Result table [Table]`

**External links**

[BigQuery reference](https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_geogfromtext)

[Redshift reference](https://docs.aws.amazon.com/redshift/latest/dg/ST_GeogFromText-function.html)

## ST GeogPoint

**Description**

This component creates a new table with an additional column with point geographies. Geographies are created based on columns containing latitude and longitude values.

{% hint style="info" %}
The new column containing the points will be named `geom`. If there is already a column with that name in the input table, the component will return an error. Please rename any columns named `geom` from the input before connecting this component.
{% endhint %}

**Inputs**

* `Source table [Table]`
* `Latitude column [Column]`
* `Longitude column [Column]`

**Outputs**

* `Result table [Table]`

**External links**

[BigQuery reference](https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_geogpoint)

[Redshift reference](https://docs.aws.amazon.com/redshift/latest/dg/ST_Point-function.html)

## Table from GeoJSON

**Description**

This creates a new table from a GeoJSON string.

By clicking on "*Draw features*" you will be able to use a point and click UI to define custom features (points, lines or polygons) that will be used to generate the GeoJSON string.

**Inputs**

* `GeoJSON string [String]`

**Outputs**

* `Result table [Table]`

## WKB from GeoJSON

**Description**

This component creates a new column with geometries in WKB format created from the values in another column.

{% hint style="info" %}
**Databricks users:** This component is only needed for legacy cluster-based Databricks connections that use WKB binary format. If you are using the recommended SQL Warehouse connection with native GEOMETRY type, use the standard geometry parsing components instead.
{% endhint %}

**Inputs**

* **Source table**

**Settings**

* **Column with geometries definition:** Expects a String column that contains GeoJSON defintion of geometries.

**Outputs**

* **Output table:** This component return a table with the same columns as the input, plus an additional binary column that contians WKB geometries

## WKB from Text

**Description**

This component creates a new column with geometries in WKB format created from the values in another column.

{% hint style="info" %}
**Databricks users:** This component is only needed for legacy cluster-based Databricks connections that use WKB binary format. If you are using the recommended SQL Warehouse connection with native GEOMETRY type, use the standard geometry parsing components instead.
{% endhint %}

**Inputs**

* **Source table**

**Settings**

* **Column with geometries definition:** Expects a String column that contains WKT definition of geometries.

**Outputs**

* **Output table:** This component return a table with the same columns as the input, plus an additional binary column that contians WKB geometries


---

# 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.carto.com/carto-user-manual/workflows/components/parsers.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.
