Pipeline examples¶
Type these in Create → AI Assistant on Enciva Web, or in the Desktop AI Assistant. Both use the providers configured on the Enciva server.
Each example assumes saved connections with ordinary names: a source called Neighborhoods or School points, a PostGIS destination called Production PostGIS, and an S3 destination called Delivery bucket. Use your own saved names. The assistant asks when more than one connection matches.
A generated result is an unsaved draft. Review it, open it on the canvas, and complete any destination fields the review still lists. Click Run when you want one execution. Click Save as Job when you want to keep it and choose a schedule.
The sentences in Illustrative instructions show the kind of request the assistant is built to turn into that draft. They are not a transcript of one recorded provider session.
The District Intelligence plan is the five-operation plan exercised by Enciva's automated preparation tests.
Illustrative instructions¶
Convert a source to GeoPackage¶
The review should name the Neighborhoods source and show GeoPackage as the conversion. Open the draft and choose Download, or a saved file destination, if the review still needs a place to put the file. Run converts it once without saving a Job.
Deliver the file to S3¶
Convert Neighborhoods to a GeoPackage and store it in Delivery bucket as exports/neighborhoods.gpkg.
The draft should name Delivery bucket. If the object key is still empty, the review can suggest a file name. Confirm that key on the destination card before you run. Choose Fail if object exists or Overwrite existing object. Enciva does not assume overwrite.
Append to PostGIS¶
Set Schema to public (or the schema you use), Table to neighborhoods, and Write mode to Append if the review left any of those open. Append adds rows to a table that already exists. Replace overwrites the table. The assistant does not pick a write mode unless your instruction names one.
Filter features¶
Keep Neighborhoods features where status is active, and send them to Production PostGIS, replacing the neighborhoods table.
The transform step is Filter rows on the status field. The destination write mode is Replace. Field names come from the saved source. If the assistant cannot see the field, it asks instead of inventing a column.
Reproject¶
Target CRS is a conversion setting on the Job, not a separate raster reproject step. Common values include EPSG:4326, EPSG:3857, EPSG:4269, and EPSG:27700. An empty CRS keeps the source CRS. See Change coordinate systems.
Run on a schedule¶
Every day at 02:15, send Neighborhoods to the neighborhoods table in Production PostGIS and replace the existing table.
The Assistant still builds the pipeline. It does not store a daily schedule. The review says to configure the execution schedule when saving the pipeline as a Job. Open Save as Job, choose Daily at 02:15, save, and enable the Job when you want it to run on its own.
That request stays manual. Manual needs no hour, minute, weekday, or timezone.
District Intelligence¶
Verified by automated tests. This is a public-style feed of school points wrapped in JavaScript. The file assigns a JSON array. The first element is the spatial object. Geometry coordinates are not numbers. Each coordinate is a run of decimal character codes, four digits wide, separated by the digit 1.
Enciva's preparation tests run this plan on that fixture. The result is a GeoJSON FeatureCollection of 29 Point features with numeric coordinates. The plan does not assign a CRS.
Saved source name used here: School points (a URL, HTTP, or other preparable source).
Convert School points to a GeoPackage. The file is JavaScript that assigns a JSON array, and the coordinates are encoded.
The Prepare review for the tested plan is:
- Extract JSON from JavaScript wrapper
- Select JSON path
$[0] - Decode coordinate strings with decimal character codes, width 4, separator
1 - Convert coordinates to numbers
- Build a FeatureCollection
The same plan as stored on the Job:
{
"version": 1,
"description": "JavaScript-wrapped GeoJSON with encoded coordinate values.",
"input_kind": "text",
"output_kind": "geojson",
"operations": [
{ "op": "extract_javascript_assignment" },
{ "op": "select_json_path", "path": "$[0]" },
{
"op": "decode_geometry_coordinates",
"decoder": {
"type": "decimal_character_codes",
"width": 4,
"separator": "1"
}
},
{ "op": "coerce_coordinates_to_number" },
{ "op": "as_feature_collection" }
]
}
Open the draft and use Preview to confirm the points. You can edit the path, width, or separator on the Prepare card and click Validate before you continue.
After the plan is on the canvas, the normalized FeatureCollection is an ordinary pipeline input:
- Set the conversion to GeoPackage and Run to download it.
- Choose Delivery bucket and confirm the object key to store that GeoPackage in S3.
- Choose Production PostGIS, set the schema, table, and write mode, and Run to create, replace, or append the table.
Save as Job keeps the five operations. Later runs, including a schedule you enable yourself, execute this plan on the server and then GDAL. They do not send the file to the AI provider again.