You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.warn("Clustering on more than 4 columns is not supported in many SQL dialects, table {} has {} clustering columns. Removing extra ones. ", tableName, clusterColumns.size());
155
+
156
+
columns = clusterColumns.subList(0, 4) ;
157
+
}
158
+
159
+
if (!columns.isEmpty()) {
146
160
appendNewLine(builder) ;
147
161
builder.append("CLUSTER BY (");
148
-
builder.append(String.join(",", clusterColumns));
162
+
builder.append(String.join(",", columns));
149
163
builder.append(")");
150
164
} else {
151
165
log.warn("No clustering columns found for table {}", tableName);
152
166
}
153
167
}
154
168
155
-
if (tableUsing != null) {
156
-
appendNewLine(builder) ;
157
-
builder.append("USING ");
158
-
builder.append(tableUsing);
159
-
}
160
-
161
169
if (tableProperties != null && !tableProperties.isEmpty()) {
"`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`''s lower numbers \nare at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
192
-
StringUtils.escapeQuotes("`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`'s lower numbers \nare at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ")) ;
"`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`''s lower numbers \nare at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
191
+
"`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`\\'s lower numbers \nare at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
200
192
StringUtils.escapeQuotes("`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`'s lower numbers \nare at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ")) ;
Copy file name to clipboardExpand all lines: java/core/src/test/resources/SQLGenerator/ANSI/Study-clustering-and-table-properties.sql
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ CREATE TABLE brapi_Studies (
39
39
experimentalDesign
40
40
STRUCT<
41
41
PUI STRING COMMENT 'MIAPPE V1.1 (DM-23) Type of experimental design - Type of experimental design of the study, in the form of an accession number from the Crop Ontology.',
42
-
description STRING COMMENT 'MIAPPE V1.1 (DM-22) Description of the experimental design - Short description of the experimental design, possibly including statistical design. In specific cases, e.g. legacy datasets or data computed from several studies, the experimental design can be "unknown"/"NA", "aggregated/reduced data", or simply ''none''.'
42
+
description STRING COMMENT 'MIAPPE V1.1 (DM-22) Description of the experimental design - Short description of the experimental design, possibly including statistical design. In specific cases, e.g. legacy datasets or data computed from several studies, the experimental design can be "unknown"/"NA", "aggregated/reduced data", or simply \'none\'.'
43
43
> COMMENT 'The experimental and statistical design full description plus a category PUI taken from crop research ontology or agronomy ontology',
44
44
externalReferences
45
45
ARRAY<
@@ -66,7 +66,7 @@ CREATE TABLE brapi_Studies (
66
66
ARRAY<
67
67
STRUCT<
68
68
levelName STRING COMMENT 'A name for this level **Standard Level Names: study, field, entry, rep, block, sub-block, plot, sub-plot, plant, pot, sample** For more information on Observation Levels, please review the <a target="_blank" href="https://wiki.brapi.org/index.php/Observation_Levels">Observation Levels documentation</a>. ',
69
-
levelOrder INT COMMENT '`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`''s lower numbers are at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). For more information on Observation Levels, please review the <a target="_blank" href="https://wiki.brapi.org/index.php/Observation_Levels">Observation Levels documentation</a>. '
69
+
levelOrder INT COMMENT '`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`\'s lower numbers are at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). For more information on Observation Levels, please review the <a target="_blank" href="https://wiki.brapi.org/index.php/Observation_Levels">Observation Levels documentation</a>. '
70
70
>
71
71
> COMMENT 'Observation levels indicate the granularity level at which the measurements are taken. `levelName` defines the level, `levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`s lower numbers are at the top of the hierarchy (ie field > 0) and higher numbers are at the bottom of the hierarchy (ie plant > 6). **Standard Level Names: study, field, entry, rep, block, sub-block, plot, sub-plot, plant, pot, sample** For more information on Observation Levels, please review the <a target="_blank" href="https://wiki.brapi.org/index.php/Observation_Levels">Observation Levels documentation</a>. ',
72
72
observationUnitsDescription STRING COMMENT 'MIAPPE V1.1 (DM-25) Observation unit description - General description of the observation units in the study.',
@@ -83,7 +83,7 @@ CREATE TABLE brapi_Studies (
83
83
trialName STRING COMMENT 'The human readable name of a trial MIAPPE V1.1 (DM-3) Investigation title - Human-readable string summarising the investigation.',
84
84
trialPUI STRING COMMENT 'A permanent identifier for a trial. Could be DOI or other URI formatted identifier.'
85
85
)
86
-
CLUSTER BY (studyDbId,studyName,studyPUI,locationDbId,locationName,trialDbId,trialName,trialPUI)
COMMENT 'A Study represents an experiment that has taken place at a single location. The Study contains metadata about the parameters and design of the experiment. It can also be used to group results and data sets generated from the experiment. A Trial can represent a collection of one or more Studies.';
0 commit comments