{"title":"GroupBy","nodeType":"Manipulator","id":"*5stmXk6zY_ORA4bC","factoryName":"org.knime.base.node.preproc.groupby.GroupByNodeFactory","factoryId":"org.knime.base.node.preproc.groupby.GroupByNodeFactory","path":["Manipulation","Row","Transform"],"owner":"knime","ownerAccountId":"account:team:b5f0848f-496d-4e6a-b869-fa3532248db7","description":"<p>Groups the rows of a table by the unique values in the selected group columns. A row is created for each unique set of values of the selected group column. The remaining columns are aggregated based on the specified aggregation settings. The output table contains one row for each unique value combination of the selected group columns.</p>\n            \n            <p>The columns to aggregate can be either defined by selecting the columns directly, by name based on a search pattern or based on the data type. Input columns are handled in this order and only considered once e.g. columns that are added directly in the &#34;Aggregation&#34; section are ignored even if their name matches a search pattern in the &#34;Pattern Based Aggregation&#34; section or their type matches a defined type in the &#34;Type Based Aggregation&#34; section. The same holds for columns that are added based on a search pattern. They are ignored even if they match a criterion that has been defined in the &#34;Type Based Aggregation&#34; section.</p>\n            \n            <p>In the &#34;Pattern Based Aggregation&#34; section you can assign aggregation methods to columns based on a search pattern. The pattern can be either a string with wildcards or a <a href=\"https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/regex/Pattern.html#sum\" rel=\"ugc nofollow noopener noreferrer\">regular expression </a> . Columns where the name matches the pattern but where the data type is not compatible with the selected aggregation method are ignored. Only columns that have not been selected as group column or that have not been selected as aggregation column in the &#34;Aggregation&#34; section are considered.</p>\n            \n            <p>The &#34;Type Based Aggregation&#34; section allows to select an aggregation method for all columns of a certain data type e.g. to compute the mean for all decimal columns (Number (Float)). Only columns that have not been handled by the other sections e.g. group, column based and pattern based are considered. The data type list to choose from contains basic types e.g String, Number (Float), etc. and all data types the current input table contains.</p>\n            \n        \n        ","shortDescription":"Groups the table by the selected column(s) and aggregates the remaining\ncolumns using the selected aggregation method.","keywords":["Summarize","Aggregate","group by","maximum","correlation","count","deviation","mean","median","minimum","quantile","range","set","sum","variance"],"deprecated":false,"streamable":false,"tags":["Manipulation","Row","Transform"],"icon":"data:image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dGFuY2VJRD0ieG1wLmlpZDplYjRlYWE5NS1mMzM5LTQzZTctYmY1Yy0yNzFmOThkY2ZiMmIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MGIzNmFjOTctNWViYS00MGU3LTkxODktYmJlOGQ3ZDBmMjRlIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YgCPzAAAAEBJREFUeNpiYGBg+E8AP2DAA5gYKAQDbwALEDNiEf9PNxcw/v+PaRkjI+P/EWQAA8gAdEzXlMhCknOHZ14ACDAAHBMtwUKLErMAAAAASUVORK5CYII=","views":[],"inPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Data table","description":"The input table to group"}],"outPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Group table","description":"Result table with one row for each existing value combination of the selected data"}],"dynInPorts":[],"dynOutPorts":[],"additionalSiteInformation":{"url":"https://update.knime.com/analytics-platform/5.12","trusted":true,"enabledByDefault":true,"name":"KNIME Analytics Platform 5.12 Update Site","version":"5.12.0"},"dialog":[{"sectionName":"Options","fields":[{"name":"Group columns","description":"Select one or more column(s) according to which the group(s) is/are created.","optional":false},{"name":"Manual","description":"Select one or more column(s) for aggregation from the available columns list. Change the aggregation method in the Aggregation column of the table. You can add the same column multiple times.\n<ul><li><b>Column</b> : The column to aggregate</li><li><b>Aggregation</b> : The aggregation method to use</li><li><b>Missing values</b> : Missing values are considered during aggregation if the missing option set to &#34;Included&#34;. Some aggregation methods do not support the changing of the missing option such as &#34;Mean&#34;.</li></ul>","optional":false},{"name":"Pattern Based Aggregation","description":"<p>The search pattern can either be a string with wildcards or a <a href=\"https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html#sum\" rel=\"ugc nofollow noopener noreferrer\"> regular expression</a> .</p>\nSupported wildcards are <code>*</code> (matches any number of characters) and <code>?</code> (matches one character) e.g. <code>KNI*</code> would match all strings that start with &#34;KNI&#34; such as &#34;KNIME&#34; whereas <code>KNI?</code> would match only strings that start with &#34;KNI&#34; followed by a fourth character.\n<ul><li><b>Search pattern</b> : Wildcard or regular expression pattern</li><li><b>Pattern type</b> : Specifies whether the search pattern is a regular expression or a string with wildcards ( <code>*</code> and <code>?</code> ).</li><li><b>Aggregation</b> : The aggregation method to use</li><li><b>Missing values</b> : Missing values are considered during aggregation if the missing option set to &#34;Included&#34;. Some aggregation methods do not support the changing of the missing option such as &#34;Mean&#34;.</li></ul>","optional":false},{"name":"Type Based Aggregation","description":"Aggregations are applied to all columns of the selected type.\n<ul><li><b>Data Type</b> : Select the data type to apply the aggregation on. You can add the same data type multiple times. The list contains all registered data types the system knows about.</li><li><b>Aggregation</b> : The aggregation method to use</li><li><b>Missing values</b> : Missing values are considered during aggregation if the missing option set to &#34;Included&#34;. Some aggregation methods do not support the changing of the missing option such as &#34;Mean&#34;.</li></ul>","optional":false},{"name":"Type matching","description":"Define how strict the type matching for the aggregations is.\n<ul><li><b>Strict</b> : The type based aggregation method is only applied to columns of the selected type.</li><li><b>Include sub-types</b> : The type based aggregation method is also applied to columns containing sub-types of the selected type. For example <i>Boolean</i> is a sub-type of <i>Number (Integer)</i> , <i>Number (Integer)</i> of <i>Number (Long)</i> , and <i>Number (Long)</i> of <i>Number (Float)</i> .</li></ul>","optional":false},{"name":"Column naming","description":"The name of the resulting aggregation column(s) depends on the selected naming schema.\n<ul><li>Keep original name(s): Keeps the original column names. Note that you can use all aggregation columns only once with this column naming option to prevent duplicate column names.</li><li>Aggregation method (column name): Uses the aggregation method first and appends the column name in brackets</li><li>Column name (aggregation method): Uses the column name first and appends the aggregation method in brackets</li></ul>\nAll aggregation methods get a * appended if the missing value option is not ticked in the aggregation settings in order to distinguish between columns that considered missing values in the aggregation process and columns that do not.","optional":false},{"name":"Maximum unique values per group","description":"Defines the maximum number of unique values per group to avoid problems with memory overloading. All groups with more unique values are skipped during the calculation and a missing value is set in the corresponding column, and a warning is displayed.","optional":false},{"name":"Value delimiter","description":"The value delimiter used by aggregation methods such as concatenate.","optional":false},{"name":"Enable hiliting","description":"If enabled, the hiliting of a group row will hilite all rows of this group in other views. Depending on the number of rows, enabling this feature might consume a lot of memory.","optional":false},{"name":"Process in memory","description":"Process the table in the memory. Requires more memory but is faster since the table needs not to be sorted prior aggregation. The memory consumption depends on the number of unique groups and the chosen aggregation method. The row order of the input table is automatically retained.","optional":false},{"name":"Retain row order","description":"Retains the original row order of the input table. Could result in longer execution time. The row order is automatically retained if the process in memory option is selected.","optional":false}]}],"links":[{"text":"Basic Examples for using the GroupBy Node","url":"https://hub.knime.com/knime/spaces/Examples/02_ETL_Data_Manipulation/02_Aggregations/06_Basic_Examples_for_Using_the_GroupBy_Node~31LVQFRFzoqaY_zm/most-recent"}],"kudos":[{"accountId":"account:user:3784265b-0f76-45f2-9a61-e472e4206f70","user":"nimantha","date":"2021-02-07T17:44:44+00:00"},{"accountId":"account:user:e7329d08-bcfa-4f5b-9652-f84f491b2848","user":"sdyd","date":"2024-10-24T08:42:59+00:00"},{"accountId":"account:user:3a5aea77-6309-4354-8099-fd59b8c12196","user":"paolotamag","date":"2021-02-12T08:56:03+00:00"},{"accountId":"account:user:119cf2e9-034f-48c3-b7a0-8e90670da740","user":"jessica_cong","date":"2025-03-06T06:17:43+00:00"},{"accountId":"account:user:1a89b8de-a1af-46a8-a907-d520758b3d19","user":"lada","date":"2020-12-29T16:18:49+00:00"},{"accountId":"account:user:ef1ea371-9aa5-4687-be87-13d6e7ee24f2","user":"viniciussan","date":"2024-03-22T17:16:56+00:00"},{"accountId":"account:user:498b0732-17cb-40a8-bc35-fccbe94ac93e","user":"nborbas","date":"2023-04-27T08:55:22+00:00"},{"accountId":"account:user:e01cf770-6077-4d14-b3e4-3851baf4dc4b","user":"albrecht","date":"2020-09-17T12:35:17+00:00"}],"kudosCount":8,"bundleInformation":{"bundleVersion":"5.12.0.v202606261225","bundleName":"KNIME Base Nodes","bundleSymbolicName":"org.knime.base","bundleVendor":"KNIME AG, Zurich, Switzerland","featureSymbolicName":"org.knime.features.base","featureName":"KNIME Base nodes","featureVersion":"5.12.0.v202606261225","featureVendor":"KNIME AG, Zurich, Switzerland","extensionId":"*bjR3r1yWOznPIEXS"},"frequentSuccessors":[{"id":"*ZgYyOm1P9VJVBE9e","factoryName":"org.knime.base.node.preproc.joiner.Joiner2NodeFactory","probability":0.1926207817737342},{"id":"*jd2U-FYTI8jCbQls","factoryName":"org.knime.base.node.preproc.filter.row.RowFilterNodeFactory","probability":0.07109554172232163},{"id":"*PHWv6FsABEjrSc76","factoryName":"org.knime.base.node.preproc.rename.RenameNodeFactory","probability":0.05489049623226392},{"id":"*5stmXk6zY_ORA4bC","factoryName":"org.knime.base.node.preproc.groupby.GroupByNodeFactory","probability":0.05214345119584667},{"id":"*2fI5rIsFDCFPHc0R","factoryName":"org.knime.ext.jep.JEPNodeFactory","probability":0.04382670934247335},{"id":"*JiJhJpgkWWuOfG2s","factoryName":"org.knime.ext.poi2.node.write2.XLSWriter2NodeFactory","probability":0.04082764182565085},{"id":"*Oy714gpoifm4PiOZ","factoryName":"org.knime.base.node.io.csvwriter.CSVWriterNodeFactory","probability":0.03354419214193906},{"id":"*gwwIZ5c5EYsJErci","factoryName":"org.knime.base.node.preproc.sorter.SorterNodeFactory","probability":0.03112477633004864},{"id":"*Q-yW-3C9DumtInuz","factoryName":"org.knime.base.node.rules.engine.RuleEngineFilterNodeFactory","probability":0.023538899669850552},{"id":"*0rhLXWO6OS1xMi8T","factoryName":"org.knime.base.node.preproc.append.row.AppendedRowsNodeFactory","probability":0.020514629904987525}]}
