Read shapefiles and load the data in Snowflake

This example pipeline demonstrates how to read shapefiles from the File Reader Snap, map the content type, parse the input, map the data to a Snowflake table, and then load the data to Snowflake.

Download this Pipeline
  1. Configure File Reader Snap to read shapefiles

    First, we configure the File Reader Snap to read shapefiles from a ZIP file.


    File Reader Snap Settings

  2. Map content type using Mapper Snap (if file is in SLDB)

    Next, we add a Mapper Snap to map the content type because the input file resides in SLDB. This step is only needed for input files that reside in SLDB.

    In this example, we’ve mapped the content type to application/zip because our input is a ZIP file of shapefiles.

    If your input is a GML file, you must update the content type as application/gml+xml; charset=utf-8.


    Mapper Snap - content type mapping

  3. Parse input using WKT Parser Snap

    Upon validation, the output from the Mapper Snap is sent to the WKT Parser Snap, which parses the shapefiles.


    WKT Parser Snap output

  4. Map parsed data using Mapper Snap

    Next, the output from this is sent to the Mapper Snap, where we have mapped the data.

    In this example, we’ve mapped the output document to the GEOMETRY column in our Snowflake table.


    Mapper Snap - output mapped to Snowflake GEOMETRY column

  5. Configure Snowflake Snap for data load

    Finally, we configure the Snowflake Snap with our SnapLogic Snowflake Account credentials and specify the Snowflake target schema and table in the Schema Name and Table Name fields.


    Snowflake Snap configuration

  1. Ensure the input ZIP file contains valid shapefiles (.shp).
  2. If the input file is in SLDB, map the content type using a Mapper Snap.
  3. Validate the WKT Parser output and map the data correctly to your Snowflake schema.