How Fivetran Syncs Native PostgreSQL Geometric Data Types
Question
How does Fivetran handle native PostgreSQL geometric data types during sync?
Environment
Connector: PostgreSQL
Answer
Fivetran supports the following native PostgreSQL geometric data types:
- BOX
- CIRCLE
- LINE (infinite line)
- LINE SEGMENT (
lseg
) - PATH
- POINT
- POLYGON
These are built-in PostgreSQL types (not PostGIS types) and are stored in the destination as JSON. Where possible, Fivetran uses the GeoJSON specification for naming and structure. For types not covered by the GeoJSON standard, we use custom extensions to preserve all source information.
Canonical JSON representations
Point: Represents a single two-dimensional location.
{ "type": "Point", "coordinates": [<x>, <y>] }
Line Segment: Finite line defined by two endpoints.
{ "type": "LineString", "coordinates": [ [<x1>, <y1>], [<x2>, <y2>] ] }
Path: An ordered sequence of points, which may be open or closed.
{ "type": "MultiLineString", "closed": <true|false>, "coordinates": [ [<x1>, <y1>], [<x2>, <y2>], ... ] }
Box: A rectangular envelope with corners ordered as: top-right, bottom-right, bottom-left, top-left.
{ "type": "Polygon", "coordinates": [ [<x_tr>, <y_tr>], [<x_br>, <y_br>], [<x_bl>, <y_bl>], [<x_tl>, <y_tl>] ] }
Polygon: A closed shape defined by a sequence of vertices. For GeoJSON compatibility, the first and last points are identical to close the ring.
{ "type": "Polygon", "coordinates": [ [ [<x1>, <y1>], [<x2>, <y2>], ... [<x1>, <y1>] ] ] }
Infinite Line: An infinite line defined by the equation
ax + by + c = 0
in PostgreSQL.{ "type": "InfiniteLine", "coefficients": [<a>, <b>, <c>] }
Circle: A circle defined by its center point and radius.
{ "type": "Circle", "centerCoordinates": [<x>, <y>], "radius": <r> }
Point
,LineString
, andPolygon
follow GeoJSON naming and structure.MultiLineString
includes aclosed
boolean to distinguish open‑path from closed‑path segments.InfiniteLine
andCircle
are non-standard extensions to native PostgreSQL types.- All coordinate arrays use
[x, y]
ordering. - For GeoJSON compatibility,
Polygon
coordinate arrays start and end with the same point.