Skip to main content
Question

API Data: JSON to SpatiaLite

  • October 24, 2024
  • 0 replies
  • 6 views

fmelizard
Safer
Forum|alt.badge.img+21
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 an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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.