Skip to main content
Question

API Data: JSON to SpatiaLite


fmelizard
Safer
Forum|alt.badge.img+18
FME Hub user lizatsafe just uploaded a new template to the FME Hub.

Purpose & Objectives

This workspace retrieves closed road JSON data from an API, fragments and flattens the JSON response into line features with attributes, and then writes the data out to a SpatiaLite database.

Key Transformers

Creator: Creates a single feature to trigger the workspace

HTTPCaller: Makes a GET request to the data source

JSONFragmenter: Fragments JSON into FME features and attributes

Data Source(s) - Reader Feature Type

A GET request to Vancouver Open Data:

https://opendata.vancouver.ca/api/explore/v2.1/catalog/datasets/road-ahead-current-road-closures/records?limit=5

Data Output - Writer Feature Type

VanRoads.sqlite SpatiaLite

Parameters:

Table Name: Closed

Geometry: db_linestring

Customization

To customize this workspace, it is recommended to build the workspace from scratch as your dataset will have different attributes and schema (structure). Instructions to build this workspace: Getting Started with FME Form: Working with Web Data.

Additional Resources

SpatiaLite Reader/Writer

Tutorial: Getting Started with JSON

Visual Preview

For help with this workspace, please contact Safe Software Support and reference API Data: JSON to SpatiaLite Gallery Example.



Would you like to know more? Click here to find out more details!
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings