Skip to content

Concept JSONs

thoniTUB edited this page May 16, 2024 · 11 revisions

Concept JSONs

This is an automatically created documentation. It is not 100% accurate since the generator does not handle every edge case.

Instead of a list ConQuery also always accepts a single element.

Each *.concept.json has to contain exactly one Concept.


Base Concept

A concept is a collection of filters and selects and their connection to tables.

Different types of Concept can be used by setting type to one of the following values:

TREE

This is a single node or concept in a concept tree.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.tree.TreeConcept

Supported Fields:

Field Type Default Example Description
connectors list of Connector []
dataset ID of @NsIdRef Dataset null
defaultExcludeFromTimeAggregation boolean false
hidden boolean false Display Concept for users.
additionalInfos list of KeyValue []
description String null
children list of ConceptTreeChild []
selects list of UniversalSelect []
label String null "someLabel" shown in the frontend
name String null

Base CTCondition

These represent guard conditions. A value matches a ConceptElement if it matches its condition and its parent

Different types of CTCondition can be used by setting type to one of the following values:

AND

This condition connects multiple conditions with an and.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.conditions.AndCondition

Supported Fields:

Field Type Default Example Description
conditions list of CTCondition null

COLUMN_EQUAL

This condition requires the value of another column to be equal to a given value.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.conditions.ColumnEqualCondition

Supported Fields:

Field Type Default Example Description
column String ?
values @NotEmpty Set<String> ?

EQUAL

This condition requires each value to be exactly as given in the list.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.conditions.EqualCondition

Supported Fields:

Field Type Default Example Description
values @NotEmpty Set<String> ?

GROOVY

A condition that is a groovy script and thus able to represent everything.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.conditions.GroovyCondition

Supported Fields:

Field Type Default Example Description
script String null

NOT

This condition matches if its child does not.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.conditions.NotCondition

Supported Fields:

Field Type Default Example Description
condition @Valid CTCondition null

OR

This condition connects multiple conditions with an or.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.conditions.OrCondition

Supported Fields:

Field Type Default Example Description
conditions list of CTCondition null

PREFIX_LIST

This condition requires each value to start with one of the given values.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.conditions.PrefixCondition

Supported Fields:

Field Type Default Example Description
prefixes list of String null

PREFIX_RANGE

This condition requires each value to start with a prefix between the two given values

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.conditions.PrefixRangeCondition

Supported Fields:

Field Type Default Example Description
max String null
min String null

PRESENT

This condition requires that the selected Column has a value.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.conditions.IsPresentCondition

Supported Fields:

Field Type Default Example Description
column String null

Base Filter

These are used to define filters, than can be used to reduce the result set.

Different types of Filter can be used by setting type to one of the following values:

BIG_MULTI_SELECT

This filter represents a select in the front end. This means that the user can select one or more values from a list of values. This Filter can use optional labels or a template for displaying, same as {@link MultiSelectFilter}. However, the frontend will fetch and display data beyond the defined values for {@link BigMultiSelectFilter}/BIG_MULTI_SELECT.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.BigMultiSelectFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @Valid @NotNull @NsIdRef Column null
generateSearchSuffixes boolean true
labels bijective map from String to String user given mapping from the values in the columns to shown labels
searchMinSuffixLength int 3
template ID of FilterTemplate null
label String null "someLabel" shown in the frontend
name String null

COUNT

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.CountFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @NsIdRef Column null
distinct boolean false
distinctByColumn list of ID of Column []
label String null "someLabel" shown in the frontend
name String null

COUNT_QUARTERS

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.CountQuartersFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @Valid @NotNull @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

DATE_DISTANCE

This filter represents a select in the front end. This means that the user can select one or more values from a list of values.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.DateDistanceFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @Valid @NotNull @NsIdRef Column null
timeUnit one of NANOS, MICROS, MILLIS, SECONDS, MINUTES, HOURS, HALF_DAYS, DAYS, WEEKS, MONTHS, YEARS, DECADES, CENTURIES, MILLENNIA, ERAS, FOREVER "YEARS"
label String null "someLabel" shown in the frontend
name String null

DURATION_SUM

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.DurationSumFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @Valid @NotNull @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

FLAGS

Implements a MultiSelect type filter, where an event can meet multiple criteria (as opposed to {@link MultiSelectFilter} which is restricted to one value per event). This is achieved by using multiple {@link com.bakdata.conquery.models.types.ResultType.BooleanT} columns, each defining if one property is met or not. The selected flags are logically or-ed.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.FlagFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null ?
defaultValue FILTER_VALUE ?
pattern String ?
tooltip String ?
unit String ?
flags list of ID of map from String to Column ?
label String ? "someLabel" shown in the frontend
name String ?

NUMBER

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.NumberFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @Valid @NotNull @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

PREFIX_TEXT

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.PrefixTextFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @Valid @NotNull @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

QUARTERS_IN_YEAR

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.QuartersInYearFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @Valid @NotNull @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

SELECT

This filter represents a select in the front end. This means that the user can select one or more values from a list of values.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.MultiSelectFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @Valid @NotNull @NsIdRef Column null
generateSearchSuffixes boolean true
labels bijective map from String to String user given mapping from the values in the columns to shown labels
searchMinSuffixLength int 3
template ID of FilterTemplate null
label String null "someLabel" shown in the frontend
name String null

SINGLE_SELECT

This filter represents a select in the front end. This means that the user can select one or more values from a list of values.",

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.SingleSelectFilter

Example:

{
	"label": "gender",
	"column": "reference_data.gender",
	"type": "SINGLE_SELECT"
}

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @Valid @NotNull @NsIdRef Column null
generateSearchSuffixes boolean true
labels bijective map from String to String user given mapping from the values in the columns to shown labels
searchMinSuffixLength int 3
template ID of FilterTemplate null
label String null "someLabel" shown in the frontend
name String null

SUM

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.filters.specific.SumFilter

Supported Fields:

Field Type Default Example Description
allowDropFile boolean or null null
defaultValue FILTER_VALUE null
pattern String null
tooltip String null
unit String null
column ID of @NotNull @NsIdRef Column null
distinctByColumn list of ID of Column []
subtractColumn ID of @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

Base Select

These are used to define selects, that can be used to create additional CSV columns.

Different types of Select can be used by setting type to one of the following values:

CONCEPT_VALUES

Select to extract the values used to build a {@link TreeConcept}.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.concept.ConceptColumnSelect

Supported Fields:

Field Type Default Example Description
description String null
asIds boolean false If true, values are returned as resolved {@link ConceptElement#getLabel()} instead of the actual values.
label String null "someLabel" shown in the frontend
name String null

COUNT

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.CountSelect

Supported Fields:

Field Type Default Example Description
description String null
column ID of @NsIdRef @NotNull Column null
distinct boolean false
distinctByColumn list of ID of Column []
label String null "someLabel" shown in the frontend
name String null

COUNT_OCCURENCES

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.CountOccurencesSelect

Supported Fields:

Field Type Default Example Description
description String ?
categorical boolean ? Indicates if the values in the specified column belong to a categorical set (bounded number of values).
column ID of @NonNull Column ?
selection list of String ?
label String ? "someLabel" shown in the frontend
name String ?

COUNT_QUARTERS

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.CountQuartersSelect

Supported Fields:

Field Type Default Example Description
description String ?
categorical boolean ? Indicates if the values in the specified column belong to a categorical set (bounded number of values).
column ID of @NonNull Column ?
label String ? "someLabel" shown in the frontend
name String ?

DATE_DISTANCE

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.DateDistanceSelect

Supported Fields:

Field Type Default Example Description
description String ?
categorical boolean ? Indicates if the values in the specified column belong to a categorical set (bounded number of values).
column ID of @NonNull Column ?
timeUnit one of NANOS, MICROS, MILLIS, SECONDS, MINUTES, HOURS, HALF_DAYS, DAYS, WEEKS, MONTHS, YEARS, DECADES, CENTURIES, MILLENNIA, ERAS, FOREVER ?
label String ? "someLabel" shown in the frontend
name String ?

DATE_UNION

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.DateUnionSelect

Supported Fields:

Field Type Default Example Description
description String null
column ID of @NsIdRef Column null
endColumn ID of @NsIdRef Column null
startColumn ID of @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

DISTINCT

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.DistinctSelect

Supported Fields:

Field Type Default Example Description
description String ?
categorical boolean ? Indicates if the values in the specified column belong to a categorical set (bounded number of values).
column ID of @NonNull Column ?
label String ? "someLabel" shown in the frontend
name String ?

DURATION_SUM

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.DurationSumSelect

Supported Fields:

Field Type Default Example Description
description String null
column ID of @NsIdRef Column null
endColumn ID of @NsIdRef Column null
startColumn ID of @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

EVENT_DATE_UNION

Collects the event dates that are corresponding to an enclosing {@link Connector} or {@link Concept} provided in a query. The resulting date set is in bounds of a provided date restriction.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.concept.specific.EventDateUnionSelect

Supported Fields:

Field Type Default Example Description
description String null
label String null "someLabel" shown in the frontend
name String null

EVENT_DURATION_SUM

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.concept.specific.EventDurationSumSelect

Supported Fields:

Field Type Default Example Description
description String ?
label String ? "someLabel" shown in the frontend
name String ?

EXISTS

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.concept.specific.ExistsSelect

Supported Fields:

Field Type Default Example Description
description String null
label String null "someLabel" shown in the frontend
name String null

FIRST

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.FirstValueSelect

Supported Fields:

Field Type Default Example Description
description String ?
categorical boolean ? Indicates if the values in the specified column belong to a categorical set (bounded number of values).
column ID of @NonNull Column ?
label String ? "someLabel" shown in the frontend
name String ?

FLAGS

Implements a MultiSelect type filter, where an event can meet multiple criteria (as opposed to {@link MultiSelectFilter} which is restricted to one value per event). This is achieved by using multiple {@link com.bakdata.conquery.models.types.ResultType.BooleanT} columns, each defining if one property is met or not. The selected flags are logically or-ed.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.FlagSelect

Supported Fields:

Field Type Default Example Description
description String ?
flags list of ID of map from String to Column ?
label String ? "someLabel" shown in the frontend
name String ?

LAST

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.LastValueSelect

Supported Fields:

Field Type Default Example Description
description String ?
categorical boolean ? Indicates if the values in the specified column belong to a categorical set (bounded number of values).
column ID of @NonNull Column ?
label String ? "someLabel" shown in the frontend
name String ?

PREFIX

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.PrefixSelect

Supported Fields:

Field Type Default Example Description
description String ?
categorical boolean ? Indicates if the values in the specified column belong to a categorical set (bounded number of values).
column ID of @NonNull Column ?
prefix String ?
label String ? "someLabel" shown in the frontend
name String ?

QUARTER

Output first, last or random Year-Quarter in time

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.concept.specific.QuarterSelect

Supported Fields:

Field Type Default Example Description
description String ?
sample one of EARLIEST, LATEST, RANDOM ?
label String ? "someLabel" shown in the frontend
name String ?

QUARTERS_IN_YEAR

Entity is included when the the number of quarters with events is within a specified range.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.QuartersInYearSelect

Supported Fields:

Field Type Default Example Description
description String ?
categorical boolean ? Indicates if the values in the specified column belong to a categorical set (bounded number of values).
column ID of @NonNull Column ?
label String ? "someLabel" shown in the frontend
name String ?

RANDOM

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.RandomValueSelect

Supported Fields:

Field Type Default Example Description
description String ?
categorical boolean ? Indicates if the values in the specified column belong to a categorical set (bounded number of values).
column ID of @NonNull Column ?
label String ? "someLabel" shown in the frontend
name String ?

SUM

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.connector.specific.SumSelect

Supported Fields:

Field Type Default Example Description
description String null
column ID of @NsIdRef @NotNull Column null
distinctByColumn list of ID of Column []
subtractColumn ID of @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

Other Types

Type ConceptTreeChild

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.tree.ConceptTreeChild

Supported Fields:

Field Type Default Example Description
additionalInfos list of KeyValue []
description String null
children list of ConceptTreeChild []
condition @NotNull CTCondition null
label String null "someLabel" shown in the frontend
name String null

Type Connector

A connector represents the connection between a column and a concept.

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.Connector

Supported Fields:

Field Type Default Example Description
selects list of Select ?
validityDates list of ValidityDate ?
validityDatesDescription String ?
label String ? "someLabel" shown in the frontend
name String ?

Type FilterTemplate

Details

Java Type: com.bakdata.conquery.apiv1.FilterTemplate

Supported Fields:

Field Type Default Example Description
columnValue String ? Value to be sent for filtering.
dataset ID of @NotNull @NsIdRef Dataset ?
filePath @NotNull URI ? Path to CSV File.
generateSuffixes boolean ?
minSuffixLength int ?
name String ?
optionValue String ? More detailed value. Displayed when value is selected.
value String ? Value displayed in Select list. Usually concise display.

Type KeyValue

This class represents a simple Key-Value pair as it is used in the additionInfos field.

Details

Java Type: com.bakdata.conquery.apiv1.KeyValue

Supported Fields:

Field Type Default Example Description
key String null
value String null

Type ValidityDate

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.ValidityDate

Supported Fields:

Field Type Default Example Description
column ID of @NsIdRef Column null
endColumn ID of @NsIdRef Column null
startColumn ID of @NsIdRef Column null
label String null "someLabel" shown in the frontend
name String null

Marker Interfaces

Marker UniversalSelect

Details

Java Type: com.bakdata.conquery.models.datasets.concepts.select.concept.UniversalSelect

A Marker UniversalSelect is any of: