extract_items
This document has been machine translated.
Symbolically converts the transaction table based on the category definition.
The execution method uses JSON-RPC v2.0.
Example request
extract_items
is a kind of analysis API, which can be executed by specifying api_method="extract_items"
to the process
method of the Provenance API.
The following is an example of starting a Provenance session, executing extract_items
, and closing the session.
import xdata_prov.client import Api
api = Api()
api.begin_session()
api.process(api_method="extract_items", api_params={
"output_ddc": "ddc:jartic_xrain_items",
"input_ddc": "ddc:jartic_xrain_transaction",
"category_ddc": "ddc:jartic_xrain_category"
})
api.commit()
api.end_session()
Parameters
When calling the process
method with api_method="extract_items"
, api_params
will take a dict containing the following keys.
Parameters with a blank default value are required.
key | description | default value |
---|---|---|
output_ddc | registered to ddc | |
output_mode | output mode (overwrite or error ) |
error |
input_ddc | input data ddc | |
category_ddc | category definition ddc |
input_data
transaction table
The input ddc specified by input_ddc
is a "transaction table".
This table must have the following schema.
column name | data type | description |
---|---|---|
id | integer | ID that uniquely identifies the transaction |
start_datetime | timestamp with time zone | start date and time |
end_datetime | timestamp with time zone | end_date |
location | geometry | spatial range |
meshcode | character varying | meshcode |
* | arbitrary theme attribute |
Category definition table
The input ddc, specified by category_ddc
, is the "category definition table".
This table must have the following schema.
column name | data type | description |
---|---|---|
item | text | column name |
min | double precision | minimum value (including the specified value) |
max | double precision | maximum value (does not contain the specified value) |
category | text | category string |
Output data
symbol-translated transaction table.
The "symbolic-translated transaction table" will be output to the destination ddc specified by output_ddc
.
This table has the following schema.
column name | data type | description |
---|---|---|
id | integer | ID that uniquely identifies the transaction |
start_datetime | timestamp with time zone | start date and time |
end_datetime | timestamp with time zone | end_date and time |
location | geometry | spatial range |
meshcode | character varying | meshcode |
* | Transaction Table Theme Attributes | |
items | text[] | a set of events that occurred in this space-time range |
return value
extract_items
returns the ddc information of the destination ddc.
This is the behavior defined by the specification of the process
method of the Provenance API.