/
Create Task to create Police Team information

Create Task to create Police Team information

For police teams the neighbourhood_teams (point) dataset must be joined to the neighbourhood_boundaries (polygon) dataset before you can use the data.

This is done via a Stored Procedure Task. In the tree, right click on the Refresh Police Data Job and select New Task.

Select the Stored Procedure type and click OK.

Task Details

Enter the following:

Task Name

Enter a Name for the task e.g. Join Teams and Boundaries

Connection

Select the Data Share database from the list.

Stored Procedure

First select the Workflow radio button as this will limit the list of available stored procedures and then select the at_wkf_executecmd entry from the list (from v6.0.0 this is called wkf_executecmd under the -Workflow- Function filter).

Parameters

Click on Parameter 1. cmdtoexecute and enter the following:

Example
drop table if exists police_neighb_teams;
  
Create table police_neighb_teams as
select a.ogc_fid, a.name, a.rank, a.id, b.name as neighbourhood, b.forcename, b.wkb_geometry from neighbourhood_teams a, neighbourhood_boundaries b where st_within(a.qkb_geometry, b.wkb_geometry);

Now click the Run button  to run the Task to create the police_neighb_teams table.

Related content

Create Job to Refresh Police data
Create Job to Refresh Police data
More like this
Create the Tasks to download the Police data
Create the Tasks to download the Police data
More like this
Create Table for Nursery Schools
Create Table for Nursery Schools
More like this
Create Table for Doctors
Create Table for Doctors
More like this
Create Task to Spatialise the Elgin data
Create Task to Spatialise the Elgin data
More like this
Geopivoting
Geopivoting
More like this