External Events
External events can be created with JSON inputs.
Creating an external source and associated event types
mutation CreateExternalSource(
$derivation_group: derivation_group_insert_input!
$event_type: [external_event_type_insert_input!]!
$source: external_source_insert_input!
$source_type: external_source_type_insert_input!
) {
upsertExternalEventType: insert_external_event_type(
objects: $event_type
on_conflict: { constraint: external_event_type_pkey }
) {
returning {
name
}
}
upsertExternalSourceType: insert_external_source_type_one(
object: $source_type
on_conflict: { constraint: external_source_type_pkey }
) {
name
}
upsertDerivationGroup: insert_derivation_group_one(
object: $derivation_group
on_conflict: { constraint: derivation_group_pkey }
) {
name
}
createExternalSource: insert_external_source_one(object: $source) {
end_time
key
derivation_group_name
source_type_name
start_time
valid_at
}
}
{
"derivation_group": {
"name": "Example",
"source_type_name": "docs"
},
"event_type": [
{
"name": "comm_pass"
}
],
"source": {
"derivation_group_name": "Example",
"end_time": "2025-03-09T16:40:00+00:00",
"external_events": {
"data": [
{
"duration": "2:55:00",
"event_type_name": "comm_pass",
"key": "DSS-43_6616_6616_0",
"start_time": "2024-10-23T04:45:00"
},
{
"duration": "9:50:00",
"event_type_name": "comm_pass",
"key": "DSS-43_6617_6617_1",
"start_time": "2024-10-24T06:00:00"
}
]
},
"key": "example20241217.json",
"source_type_name": "docs",
"start_time": "2024-10-23T04:15:00+00:00",
"valid_at": "2024-10-22T21:39:58+00:00"
},
"source_type": {
"name": "docs"
}
}