This Proposed Recommendation has been approved for publication by the XBRL Standards Board. Proposed Recommendation status indicates that the document is complete, and will move to Recommendation status if no adverse feedback is received.
xBRL-CSV Table Constraints are a set of backwards-compatible extensions to xBRL-CSV that enable basic but extremely efficient validation checks.
This specification defines a number of additional validation instructions that sit within xBRL-CSV metadata files, supporting efficient validation of CSV files prior to loading of an XBRL taxonomy and construction of an OIM report model.
This specification does not stipulate a processing model. The design is intended to enable streaming and parallelisation. Most checks can be performed using constant memory, operating on a single row at a time. However, processors remain free to load entire CSV files into memory, or transfer them to persistent storage, if this is convenient for implementing the checks described here or for later operations.
Green text denotes a definition of the term in bold font. For example:
Text in a blue box denotes a non-normative explanatory note:
This is non-normative commentary.
QNames in parenthetical red text after a "MUST" or "MUST NOT" statement prescribe standardised error codes to be used if the preceding condition is violated. For example,
The
exampleproperty MUST be defined (eg:exampleErrorCode).
"MUST" or "MUST NOT" statements that do not have a prescribed error code are not automatically enforceable, and processors are not required to detect violations.
Prefixes used in this specification are to be interpreted according to the following table:
| Prefix | Namespace URI |
|---|---|
| tc | https://xbrl.org/PR/2026-03-18/tc |
| tcme | https://xbrl.org/PR/2026-03-18/tc/metadataerror |
| tcre | https://xbrl.org/PR/2026-03-18/tc/reporterror |
| xbrl | https://xbrl.org/2021 |
| xs | http://www.w3.org/2001/XMLSchema |
The namespace URI https://xbrl.org/PR/2026-03-18/tc MUST NOT be bound to a prefix other than tc (tcme:invalidNamespacePrefix).
This specification defines three types of validation and two types of processor.
Validation falls into the following categories:
A Table Constraint report validator is a processor that takes an xBRL-CSV report as input and enforces report related constraints defined in this specification.
On encountering a document with the xBRL-CSV document type, a Table Constraint report validator MUST perform Report validation, raising tcre error codes as appropriate.
A Table Constraint metadata validator is a processor that takes an xBRL-CSV report as input and enforces metadata related constraints defined in this specification.
On encountering a document with the xBRL-CSV document type, a Table Constraint metadata validator MUST perform Metadata validation, raising tcme error codes as appropriate.
Some table constraint metadata overlaps with information present in the taxonomy, and it is important that this information is consistent.
This specification does not define specific checks that must be performed by a Table Constraint linter, but instead provides some non-normative, non-exhaustive recommendations for checks that could be performed by such a processor.
Note that Metadata validation and Metadata linting checks are independent of the values in the report. In the common case, where xBRL-CSV metadata is published by an authority collecting xBRL-CSV reports, and re-used for all reports, metadata linting checks only need to be run once and do not need to be repeated for every report.
Table constraint instructions are embedded within xBRL-CSV metadata files, and subject to the same basic JSON syntax restrictions (xbrlce:invalidJSON).
This specification documents the allowed types for all values in JSON metadata. Types are specified as:
Values in the JSON metadata MUST have the JSON type specified with the value constrained as noted above (xbrlce:invalidJSONStructure).
The JSON null value MUST NOT be used unless explicitly specified (tcme:invalidJSONStructure).
In addition, the following constraints apply to JSON metadata (tcme:invalidJSONStructure):
Table constraints are defined by the inclusion of additional properties in xBRL-CSV metadata files. The names of these additional properties are QNames using the tc reserved prefix.
xBRL-CSV metadata files MUST NOT include any tc-prefixed properties other than those defined in this specification, and the defined properties MUST NOT appear within JSON objects other than those defined in this specification (tcme:misplacedOrUnknownProperty).
The xBRL-CSV specification explicitly defines three roles for a column:
This specification uses the following additional definitions:
Note that xBRL-CSV does not prevent a fact column from also providing dimension values for fact columns. Such a hybrid column would not qualify as a dimension column according to this specification.
The xBRL-CSV specification supports table parameters and report parameters. These enable metadata definitions to make use of values defined at either the table or report-level. The parameters used by a table template are not declared explicitly. This specification provides a mechanism for explicitly declaring and constraining the expected parameters for a table template.
Expected parameters can be documented by placing a tc:parameters property as an additional property of a table template object.
The value of the tc:parameters property is a parameters object.
The keys of a parameters object MUST be identifiers (xbrlce:invalidIdentifier). Each key gives the name of the expected parameter.
Each value is a value constraint object.
A parameter that has been defined using this mechanism is known as a defined parameter.
This specification does not require that all parameters provided by the report are defined parameters. The xBRL-CSV specification defines xbrlce:unreferencedParameter, which is raised if a parameter is provided in a report, but not referenced from the xBRL-CSV metadata. Including all parameters referenced by the metadata in at least one tc:parameters object will thus enforce that only defined parameters can be reported.
A constrained column MUST NOT have the same name as a defined parameter in the same table template (tcme:columnParameterConflict)
When processing a data table, processors MUST raise an error (tcre:columnParameterConflict) if a report parameter or table parameter has the same name as a constrained column in the corresponding table template.
Constraints can be applied to all values in an xBRL-CSV column by placing a tc:constraints property in the additional properties of a column object.
The value of the tc:constraints property is a value constraint object.
A value constraint object specifies constraints on the values for a column or parameter. It has the following properties:
type (string)optional (boolean)false.nillable (boolean)false.enumerationValues (array)patterns (array)timeZone (boolean)periodType (string)perioddurationType (string)xs:durationlength (non-negative integer)minLength (non-negative integer)maxLength (non-negative integer)minInclusive (string)maxInclusive (string)minExclusive (string)maxExclusive (string)totalDigits (non-negative integer)fractionDigits (non-negative integer)The constrained column or defined parameter associated with a value constraint object is known as the constraint subject.
The enumerationValues, patterns, length, minLength, minInclusive, maxInclusive, minExclusive, maxExclusive, totalDigits and fractionDigits properties are referred to as XML Schema facet properties. XML Schema facet properties map to XML Schema facets as follows:
enumerationValues maps to the XML Schema enumeration facet;patterns maps to the XML Schema pattern facet, with values in the set being treated as equivalent to multiple <pattern> elements within a <simpleType>;A value for a constrained column or defined parameter is known as a constrained value.
Value constraints are applied to:
Value constraints for a constrained column are applied to the effective column value of the cell. Value constraints for a defined parameter are applied to the effective parameter value.
Value constraints for a defined parameter are applied even if the value does not make a contribution to the report model (see xBRL-CSV section 3.2.5).
Parameter and cell values are subject to special value processing defined by the xBRL-CSV specification before constraints in this specification apply, as described in the following sections.
The term null value is used in this specification to represent the absence of a value.
As detailed below, various representations in xBRL-CSV may lead to a null value:
#nil and #none.A literal value of #empty (which is converted by special value processing to an empty string) is not a null value.
The effective column value is the value of a cell in a constrained column, after applying the resolution of any applicable parameters, as described below:
#none or #nil, the effective column value is the null value;A cell in an xBRL-CSV table has content if its effective column value is anything other than the null value .
The effective parameter value is the value obtained for a defined parameter, as described below:
#none or #nil, the effective column value is the null value;The effective field value is the value obtained for a field as described below:
A table constraint datatype specifies the datatype for values in a column. A table constraint datatype MUST be one of the following (tcme:unknownType):
decimals, indicating that the constraint subject provides a value for the decimals property.In the first case, the QName MUST be expressed as a valid xs:QName in canonical lexical representation.
Note that the xs prefix used for XML Schema built-in datatype QNames MUST be declared in the namespaces object, as required by xBRL-CSV. The requirement for canonical lexical representation prohibits leading and trailing whitespace. Violation of this requirement triggers tcme:unknownType.
An xBRL-CSV core dimension is one of the following OIM core dimensions, identified by the specified string:
| Identifier | Dimension | Effective XML Schema lexical base type | Effective XML Schema semantic base type |
|---|---|---|---|
concept |
Concept core dimension | xs:QName |
xs:QName |
entity |
Entity core dimension | xs:token |
xs:token |
period |
Period core dimension | xs:string |
xs:dateTime pair |
unit |
Unit core dimension | xs:string |
xs:string |
language |
Language core dimension | xs:language |
xs:language |
The specified table constraint datatype is used to determine an effective XML Schema lexical base type as follows:
decimals then the effective XML Schema lexical base type is xs:integer; otherwiseAn effective XML Schema semantic base type is determined in the same way, with the exception that the period xBRL-CSV core dimension is treated as a pair of xs:dateTime values corresponding to the start and end of the period. The effective XML Schema semantic base type is used for establishing key equality and ordering (see Section 4.8).
An effective XML Schema type is derived by restriction from the effective XML Schema lexical base type as described in Section 4.6.12.
All values for a constrained value MUST be valid against the effective XML Schema type, as defined in the XML Schema specification (tcre:invalidValue).
The decimal suffix feature defined in xBRL-CSV MUST NOT be used for columns on which a type constraint is defined (tcre:invalidValue).
Where the table constraint datatype is an xBRL-CSV core dimension, values for the constrained value MUST be valid according to the allowed representations for that dimension, as prescribed by the xBRL-CSV specification (tcre:invalidValue).
If specified, each item in the enumerationValues set MUST be a valid value for the effective XML Schema type (tcme:illegalConstraint).
The example below shows a value constraint object on a column object.
"c0090": {
"dimensions": {
"concept": "dict:somedate"
}
"tc:constraints": {
"type": "xs:date"
}
},
In this case, the value is constrained to the xs:date datatype. The value 2024-12-31 appearing in this column would be accepted, but 31/12/2024 would result in a tcre:invalidValue error.
If optional is set to false, then:
Note:
#empty in CSV or JSON metadata, or a literal empty string in JSON metadata) is considered a value, and satisfies this constraint.If nillable is not set to true, the constrained value MUST NOT be a JSON null or the string #nil (tcre:invalidValue).
The required value check above also forbids nil values, so it only makes sense to set nillable to true when optional is set to true.
If the timeZone property is specified, type MUST be period or an optionally-time-zoned schema type (tcme:illegalConstraint).
If timeZone is set to true, all values for the constraint subject MUST have a time zone component (tcre:missingTimeZone).
If timeZone is set to false, the values MUST NOT have a time zone component (tcre:unexpectedTimeZone).
If the timeZone property is absent, the presence or absence of a time zone component is unconstrained.
If the periodType property is specified, type MUST be period (tcme:illegalConstraint).
The periodType property takes one of the following values (tcme:unknownPeriodType), with noted implications for constraint subject value validation:
year, half, quarter, week, month, dayinstant"tc:constraints": {
"type": "period"
"periodType": "year"
}
In this example, the value 2024 is valid, but 2024H1 will result in tcre:invalidPeriodType.
Other examples for period type constraints:
half:2024H12024quarter: 2024Q12024Q0month:2024-12202410week: 2024W292024day: 2024-12-312024-31-12instant: 2024Q1@end2024W29If the durationType property is specified, the type MUST be xs:duration (tcme:illegalConstraint).
The durationType property takes one of the following values (tcme:unknownDurationType):
yearMonthdayTimeIf durationType is yearMonth then the value MUST only contain year and month components (tcre:invalidDurationType).
If durationType is dayTime then the value MUST only contain day, hour, minute and second components (tcre:invalidDurationType).
The effective XML Schema type is an XML Schema simple type definition that is obtained from the effective XML Schema lexical base type as described in this section.
The properties of the simple type definition for the effective XML Schema type are as follows:
{name}{target namespace}{variety}atomic{facets}{facets} of the effective XML Schema lexical base type.{fundamental facets}{base type definition}{final}{annotation}Any facets specified by XML Schema facet properties MUST satisfy the relevant Schema Component Constraints specified for the facet including the Valid Restriction constraints, defined in XML Schema Part 2 (tcme:illegalConstraint).
The functionality described in this section is intended to be equivalent to defining an XML Schema simple type that is derived by restriction from the XML Schema simple type specified for the column.
In the case of a column that represents a core dimension, the effective schema
type for the column is specified by the table in Section 4.6.6. Note
that the effective type is xs:token for entity, and xs:string for
period and unit.
Note XML Schema patterns are implicitly anchored to the start and end of the subject string, and also have restrictions on which characters may be escaped using \.
Given the following patterns constraint:
"tc:constraints": {
"type": "xs:string",
"patterns": [
"[a-z][a-z][a-z]",
"[A-Z][A-Z][A-Z]"
]
}
aaa and AAA are valid.aaA is invalid.baaa and aaab are invalid.As noted above, constraints applied to a core dimension are handled according
to the effective schema type specified by the table in Section 4.6.6.
For example, period values are treated as xs:string.
Given the following period constraint:
"tc:constraints": {
"type": "period",
"enumerationValues": [
"2021",
"2022"
]
}
This would allow a CSV file to use the 2021 abbreviated period format (see
xBRL-CSV period formats) but not the equivalent
explicit format: 2021-01-01T00:00:00/2022-01-01T00:00:00.
A Table Constraint linter should check wherever possible that any values permitted by value constraints are also valid according to the relevant taxonomy definition. This may include the following specific metadata linting checks:
enumerationValues should be valid against the relevant taxonomy type or types for the constraint subject.Establishing the taxonomy type or types for values constrained by a value constraint is not always trivial or in some cases possible, as the concept or dimension may be obtained via a property group or parameter.
Constraints across multiple rows may be enforced by including a tc:keys property as an additional property of a table template object.
The value of the tc:keys property is a keys object. It has the following properties:
unique (array)reference (array)sortKey (string)At least one of unique and reference MUST be specified (tcme:missingKeyProperty).
Each of the key objects has a name property subject to the following constraints:
Each of the key objects has a fields property subject to the following constraints (tcme:illegalKeyField):
fields array MUST correspond to a constrained column or a defined parameter in the current table template.type property for an entry MUST NOT be xs:double, xs:float, xs:hexBinary or xs:base64Binary.type property for an entry specifies a type to which the timeZone property is applicable (see Section 4.6.9) then the timeZone property MUST be specified.type property for an entry is xs:duration then the durationType property MUST be specified.If sortKey is specified, the value MUST correspond to the value of the name
property of a unique key object appearing in the unique property (tcme:unknownKey).
A unique key enforces uniqueness of values appearing within certain columns.
A unique key is defined by a unique key object.
It has the following properties:
name (string)fields (array)severity (string)error and warning (tcme:unknownSeverity). Defaults to error.shared (boolean)false.Where unique key objects in different templates share the same value for
the name property, all such objects MUST have the shared property set to
true (tcme:duplicateKeyName).
The following constraint applies to the fields property of unique key objects:
The key value for a row is the ordered set of effective field values for the constrained columns or defined parameters specified in the fields array in that row.
Processors MUST raise tcre:uniqueKeyViolation if the same key value appears in more than one row, across all tables constrained by the same unique key (see Section 4.7.1.2). Equality is established as described in Section 4.8.
Where multiple templates define a unique key with the same name and the shared property is set to true, a shared unique key is defined. Uniqueness of a shared unique key is enforced across all tables for all templates sharing that unique key.
The following constraints apply to all keys comprising a shared unique key:
severity property (); andShared unique keys fulfill the subtype table requirement in a simplified way.
An example of shared unique key is splitting customer into two distinct groups, each having attributes only relevant for that group. Group 1 contains the natural person customers each having an id, a name and a birth date. Group 2 contains the legal entity customers each having an id, a name, a date of incorporation and optionally the VAT rules that apply.
The id is the unique key for both groups. The ids must be unique across both groups.
Multiple tables may be constrained by the same unique key. This occurs where:
Unique key enforcement can be optimised by checking that the rows in a table are sorted according to that key and, in the case that a key is used across multiple tables, the ranges for the key values are disjoint, such that the tables could be combined by concatenation into a single table that is sorted according to that key (see Section 4.7.4.1).
When the sortKey property is present in the tc:keys object for a table template definition, the rows for tables for that template MUST be sorted according to the specified key, as described in Section 4.7.3.
The sort key fields are the fields of the unique key named by the sortKey property.
To establish row ordering, each row is considered in turn. For each row, the effective field value for each of the sort key fields is compared to the corresponding value in the previous row:
Values are compared as described in Section 4.7.4.
Values that form part of a key value are compared according to the effective XML Schema semantic base type for the field using the XML Schema definitions of equality and, where available, ordering.
Regardless of type, a null value is considered equal to another null value (per Section 4.8), and a null value sorts before a non-null value.
Ordering is defined by XML Schema for types with an ordered fundamental facet of total (see XML Schema appendix C.1), and also for xs:duration, xs:dateTime, xs:time, xs:date, xs:gYearMonth, xs:gYear, xs:gMonthDay, xs:gDay and xs:gMonth, as the constraints in this specification requiring timeZone and durationType to be specified for key fields ensure that a total order is available.
The effective XML Schema semantic base type for the period xBRL-CSV core dimension is a pair of xs:dateTime values representing the start and end values. It is sorted according to the start value and then the end value.
Types for which an XML Schema ordering is not defined are compared as follows:
xs:boolean, false values sort before true values. xs:string, xs:QName and xs:anyURI, values are whitespace normalised according to the type's whiteSpace facet and compared lexically according to their unicode codepointsfn:compare($cur, $prev, "http://www.w3.org/2005/xpath-functions/collation/codepoint") where $cur and $prev are the whitespace normalized string representations of the values for the current and previous rows respectivelyThe table below summarises the sort behaviour applied for all possible values of type:
| Type | Effective type | Sort behaviour |
|---|---|---|
concept |
xs:QName |
Lexical |
entity |
xs:token |
Lexical |
period |
pair of xs:dateTime |
Sort by start dateTime then end dateTime (timeZone constraint ensures total ordering) |
unit |
xs:string |
Lexical |
language |
xs:language |
Lexical |
decimals |
xs:integer |
XML Schema |
xs:string |
xs:string |
Lexical |
xs:boolean |
xs:boolean |
false before true |
xs:float |
Not permitted in keys | |
xs:double |
Not permitted in keys | |
xs:decimal |
xs:decimal |
XML Schema |
xs:duration |
xs:duration |
XML Schema (durationType constraint ensures total ordering) |
xs:dateTime |
xs:dateTime |
XML Schema (timeZone constraint ensures total ordering) |
xs:time |
xs:time |
XML Schema (timeZone constraint ensures total ordering) |
xs:gYearMonth |
xs:gYearMonth |
XML Schema (timeZone constraint ensures total ordering) |
xs:gYear |
xs:gYear |
XML Schema (timeZone constraint ensures total ordering) |
xs:gMonthDay |
xs:gMonthDay |
XML Schema (timeZone constraint ensures total ordering) |
xs:gDay |
xs:gDay |
XML Schema (timeZone constraint ensures total ordering) |
xs:gMonth |
xs:gMonth |
XML Schema (timeZone constraint ensures total ordering) |
xs:hexBinary |
Not permitted in keys | |
xs:base64Binary |
Not permitted in keys | |
xs:anyURI |
xs:anyURI |
Lexical |
xs:QName |
xs:QName |
Lexical |
xs:normalizedString |
xs:normalizedString |
Lexical |
xs:token |
xs:token |
Lexical |
xs:language |
xs:language |
Lexical |
xs:Name |
xs:Name |
Lexical |
xs:NCName |
xs:NCName |
Lexical |
xs:integer |
xs:integer |
XML Schema |
xs:nonPositiveInteger |
xs:nonPositiveInteger |
XML Schema |
xs:negativeInteger |
xs:negativeInteger |
XML Schema |
xs:long |
xs:long |
XML Schema |
xs:int |
xs:int |
XML Schema |
xs:short |
xs:short |
XML Schema |
xs:byte |
xs:byte |
XML Schema |
xs:nonNegativeInteger |
xs:nonNegativeInteger |
XML Schema |
xs:unsignedLong |
xs:unsignedLong |
XML Schema |
xs:unsignedInt |
xs:unsignedInt |
XML Schema |
xs:unsignedShort |
xs:unsignedShort |
XML Schema |
xs:unsignedByte |
xs:unsignedByte |
XML Schema |
xs:positiveInteger |
xs:positiveInteger |
XML Schema |
whiteSpace facet; for example, xs:string does not undergo any normalisation.0 and false are equal, and both sort before 1 and true.In the case of cross-table unique keys (see Section 4.7.1.2), row sorting is applied across all tables for a table template.
In addition to establishing row sorting within each table, for each table A for a template constrained by a unique key there MUST NOT exist another table B for that template for which (tcre:sortKeyViolation):
There is no constraint on the ordering of rows in tables for different templates even where there is a shared unique key.
A reference key checks the values in a column (or combination of columns) against an index corresponding to a unique key.
It is common for reference keys to refer to unique keys in a different table template (hence the database term "foreign key"), but reference keys can also refer to a unique key within the same table template (a "self-referential foreign key").
A reference key is defined by a reference key object. It has the following properties:
name (string)fields (array)referencedKeyName (string)negate (boolean)true, the constraint is inverted so that it passes only if a match is not found in the referenced index. Defaults to false.severity (string)error and warning (tcme:unknownSeverity). Defaults to error.The reference key and the unique key specified in referencedKeyName MUST have consistent fields (tcme:inconsistentReferenceKeyFields).
This key specified by referencedKeyName MUST exist as a unique key in at least one template in the xBRL-CSV effective metadata (tcme:unknownKey).
The index of values corresponding to the key specified in referencedKeyName is known as the target index. When that name is found in multiple templates, the values from all templates are combined.
The ordered set of values for the parameters and columns in fields for a given row, is known as the local key value.
Reference key validation proceeds as follows for each row in the table template in which at least one of the columns or parameters in the fields object has content (tcre:referenceKeyViolation):
negate is false, there MUST be a key value in the target index that is equal to the local key value.negate is true, the MUST NOT be a key value in the target index that is equal to the local key value.Equality is determined as described in Section 4.8.
To illustrate:
If C and D both don't have a value for a row in BB, no check is done. If C has the value 123 and D has no value, then a check is made to verify that there is a line in table AA with A equal to 123 and B also no value.
Two key values are considered equal if the values for all fields in the keys are equal, as defined below:
Keys A and B have consistent fields if:
type; timeZone constraint (if specified); anddurationType constraint (if specified).The order of the columns in a CSV file may be enforced by adding the tc:columnOrder property to a tableTemplate.
Definition:
tc:columnOrder (array)If tc:columnOrder is defined then:
tc:columnOrder property (tcre:invalidColumnOrder).Constraints can be applied to the data tables for a table template by placing a tc:tableConstraints property in the additional properties of a table template object.
minTables (number)maxTables (number)minTableRows (number)maxTableRows (number)The value for these properties MUST be a JSON number, which MUST be a positive integer (xbrlce:invalidJSONStructure).
The number of data tables provided for the table template MUST be:
minTables, if specified (tcre:minTablesViolation); andmaxTables, if specified (tcre:maxTablesViolation).A fact row is a row in a data table that has a value for at least one fact column .
In each data table for the table template, the number of fact rows MUST be:
tc:minTableRows, if specified (tcre:minTableRowsViolation); andtc:maxTableRows, if specified (tcre:maxTableRowsViolation).The functionality provided by minTables overlaps with that provided by the optional field on the table object, but they are intended for use in different reporting situations:
optional works well for report templates that explicitly enumerate the allowed tablesminTables works for situations where the report author is given more freedom over the partitioning of template data across tablesConsider a dimension value supplied through a table parameter. There are cases where it is practical to enumerate all of the dimension values in advance, and other cases where the values can only be supplied by the report author. minTables (in conjunction with minTableRows) allows important facts to be made mandatory even in situations where tables are not enumerated.
This example shows the metadata for a set of CSV files capturing customer data. Every customer must be either a natural person or a legal entity. All natural persons and legal entities must be a customer. If a legal entity customer has country specific VAT rules, the country code provided must exist in countries table.
{
"documentInfo": {
"documentType": "https://xbrl.org/2021/xbrl-csv",
"namespaces": {
"eg": "http://example.com/oim/tc",
"lei": "http://standards.iso.org/iso/17442",
"iso4217": "http://www.xbrl.org/2003/iso4217",
"xs": "http://www.w3.org/2001/XMLSchema",
"tc": "https://xbrl.org/PR/2026-03-18/tc"
},
"taxonomy": [
"../base/customers.xsd"
]
},
"dimensions": {
"period": "2025-01-01@end",
"entity": "lei:legalEntityIdentifier"
},
"tableTemplates": {
"naturalPersonCustomers": {
"columns": {
"customer_id": {
"tc:constraints": {
"type": "xs:integer"
}
},
"name": {
"dimensions": {
"concept": "eg:Name"
}
},
"birthDate": {
"dimensions": {
"concept": "eg:birthDate"
}
},
"salesSizeGroup": {
"dimensions": {
"concept": "eg:salesSizeGroup"
},
"tc:constraints": {
"type": "xs:QName",
"enumerationValues": [
"eg:Small",
"eg:Medium",
"eg:Large"
]
}
}
},
"dimensions": {
"eg:customerID": "$customer_id"
},
"tc:keys": {
"unique": [
{
"name": "customerPK",
"fields": [
"customer_id"
],
"shared": true
}
]
}
},
"legalEntityCustomers": {
"columns": {
"customer_id": {
"tc:constraints": {
"type": "xs:integer"
}
},
"name": {
"dimensions": {
"concept": "eg:Name"
}
},
"incorporationDate": {
"dimensions": {
"concept": "eg:incorporationDate"
}
},
"countryCodeVAT": {
"dimensions": {
"concept": "eg:countryCode"
},
"tc:constraints": {
"type": "xs:string",
"optional": true
}
},
"salesSizeGroup": {
"dimensions": {
"concept": "eg:salesSizeGroup"
},
"tc:constraints": {
"type": "xs:QName",
"enumerationValues": [
"eg:Small",
"eg:Medium",
"eg:Large"
]
}
}
},
"dimensions": {
"eg:customerID": "$customer_id"
},
"tc:keys": {
"unique": [
{
"name": "customerPK",
"fields": [
"customer_id"
],
"shared": true
}
],
"reference": [
{
"name": "LegalEntityCountryToCountriesFK",
"fields": [
"countryCodeVAT"
],
"referencedKeyName": "countriesUK"
}
]
}
},
"countries": {
"columns": {
"country_id": {
"tc:constraints": {
"type": "xs:integer"
}
},
"countryCode": {
"dimensions": {
"concept": "eg:countryCode"
},
"tc:constraints": {
"type": "xs:string"
}
},
"VATrules": {
"dimensions": {
"concept": "eg:VATrules"
}
}
},
"dimensions": {
"eg:countryID": "$country_id"
},
"tc:keys": {
"unique": [
{
"name": "countriesPK",
"fields": [
"country_id"
]
},
{
"name": "countriesUK",
"fields": [
"countryCode"
]
}
]
}
}
},
"tables": {
"natural_persons_data": {
"template": "naturalPersonCustomers",
"url": "../base/natural-person-data.csv"
},
"legal_entity_data": {
"template": "legalEntityCustomers",
"url": "../base/legal-entity-data.csv"
},
"country_data": {
"template": "countries",
"url": "../base/country-data.csv"
}
}
}
This example shows how parameters can be constrained and used in keys.
In the sales table template, the parameter calendar_month, which is used for the period dimension, must be present. Its type is period, which restricts the syntax to values accepted for the period dimension in xBRL-CSV. Additionally, it must be a period covering a single calendar month, using the yyyy-mm shorthand format.
The unique key for the sales table consists of the calendar_month parameter and the product_id column.
{
"documentInfo": {
"documentType": "https://xbrl.org/2021/xbrl-csv",
"namespaces": {
"eg": "http://example.com/oim/tc",
"lei": "http://standards.iso.org/iso/17442",
"iso4217": "http://www.xbrl.org/2003/iso4217",
"xs": "http://www.w3.org/2001/XMLSchema",
"tc": "https://xbrl.org/PR/2026-03-18/tc"
},
"taxonomy": [
"../base/sales.xsd"
]
},
"dimensions": {
"entity": "lei:legalEntityIdentifier"
},
"tableTemplates": {
"sales": {
"columns": {
"product_id": {
"tc:constraints": {
"type": "xs:token",
"nillable": false
}
},
"sales": {
"dimensions": {
"concept": "eg:Sales",
"period": "$calendar_month",
"unit": "iso4217:EUR",
"eg:ProductId": "$product_id"
}
}
},
"tc:parameters": {
"calendar_month": {
"type": "period",
"periodType": "month",
"timeZone": false
}
},
"tc:keys": {
"unique": [
{
"name": "sales_pk",
"fields": [
"calendar_month",
"product_id"
]
}
]
}
}
},
"tables": {
"salesJan24": {
"url": "../base/salesJan24.csv",
"template": "sales",
"parameters": {
"calendar_month": "2024-01"
}
},
"salesFeb24": {
"url": "../base/salesFeb24.csv",
"template": "sales",
"parameters": {
"calendar_month": "2024-02"
}
},
"salesMar24": {
"url": "../base/salesMar24.csv",
"template": "sales",
"parameters": {
"calendar_month": "2024-03"
}
}
}
}
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to XBRL International or XBRL organizations, except as required to translate it into languages other than English. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (https://www.xbrl.org/legal).
This document and the information contained herein is provided on an "AS IS" basis and XBRL INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
The attention of users of this document is directed to the possibility that compliance with or adoption of XBRL International specifications may require use of an invention covered by patent rights. XBRL International shall not be responsible for identifying patents for which a license may be required by any XBRL International specification, or for conducting legal inquiries into the legal validity or scope of those patents that are brought to its attention. XBRL International specifications are prospective and advisory only. Prospective users are responsible for protecting themselves against liability for infringement of patents. XBRL International takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (https://www.xbrl.org/legal).