{"title":"DB Looper","nodeType":"Source","id":"*ZAffXysEzEonM415","factoryName":"org.knime.database.node.io.looping.DBLoopingNodeFactory","factoryId":"org.knime.database.node.io.looping.DBLoopingNodeFactory","path":["DB","Read/Write"],"owner":"knime","ownerAccountId":"account:team:b5f0848f-496d-4e6a-b869-fa3532248db7","description":"<p>This node runs SQL queries in the connected database restricted by the possible values given by the input table. It restricts each SQL query so that only rows that match the possible values from the input table are retrieved whereas the number of values per query can be defined. This node is usually used to execute <a href=\"https://en.wikipedia.org/wiki/Where_%28SQL%29#IN\" rel=\"ugc nofollow noopener noreferrer\"> <i>IN</i> </a> queries e.g. <i>SELECT * FROM table WHERE Col1 IN ($Col1_values$)</i> where #Col1_values# will be replaced by a comma separated list of values from the input table.</p>\n                    \n        \n        ","shortDescription":"This node runs SQL queries in the connected database restricted by the possible values given by the input table.","keywords":["database","db","sql"],"deprecated":false,"streamable":true,"tags":["DB","Read/Write","Streamable"],"icon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iI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xKIBZBszuUn5OxAXkqIZ5IKbQHwFiI9DnfeMFAMAAgwAZwZOhQTrFVQAAAAASUVORK5CYII=","views":[],"inPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Data table with possible values","description":"KNIME data table with possible values used to constrain the database SQL query."},{"objectClass":"org.knime.database.port.DBDataPortObject","color":"66002d","dataType":"DB Data","optional":false,"name":"DB Data","description":"DB Data that will be used during query execution."}],"outPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Result Table","description":"KNIME data table with the result from the database and optionally the data columns from the input table."},{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Error Table","description":"Table with error message if any, otherwise empty table."}],"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":"Settings","fields":[{"name":"SQL Statement","description":"Enter the SQL-like query here, for example <i> SELECT * FROM table WHERE Col1 IN ($Col1_values$)</i> . If the table place holder isn&#39;t changed, then it will be replaced with the query from the database input port. Constant values and any identifier from the database column list, column list and flow variable list can be used in the SQL statement by double clicking the column or variable name. For each column place holder a list of values from the input column is send to the database whereas the size of the list is defined by the <i>No of values per query</i> parameter.\n<br />\nTo open code completion press <i>&lt;CTRL&gt; &#43; &lt;SPACE&gt;</i> . Table and columns names are only suggested if the metadata is available e.g. shown in the Database Metadata Browser. To perform undo press <i>&lt;CTRL&gt; &#43; Z</i> and for re-do <i>&lt;CTRL&gt; &#43; Y</i> .","optional":false},{"name":"Database Metadata Browser","description":"The Database Metadata Browser allows you to browse the database metadata and to select a table or view. Click the <i>Refresh</i> button at the bottom right to re-fetch the metadata from the database. The data is grouped by database schema and type e.g. view or table. By clicking on an entity it shows contained elements. If you click on a table or view the dialog will fetch the column names and types of the selected element. To select a table or view select the name and click <i>OK</i> or double click the element. To search for a particular table or view enter the name or parts of the name into the search field and click on the <i>Magnifying Glass</i> button or press <i>enter</i> .","optional":false},{"name":"Database Column List","description":"The list contains the columns that are available in the input DB Data object. Double clicking any of the entries will insert the respective identifier at the current cursor position (replacing the selection, if any).","optional":false},{"name":"Column List","description":"The list contains the columns that are available in the KNIME input table. Double clicking any of the entries will insert the respective identifier at the current cursor position (replacing the selection, if any). The identifier will be replaced during execution with a comma separated list of values from this column.","optional":false},{"name":"Flow Variable List","description":"The list contains the flow variables that are currently available at the node input. Double clicking any of the entries will insert the respective identifier at the current cursor position (replacing the selection, if any).","optional":false},{"name":"No of values per query","description":"Specifies the number of values sent with each SQL query e.g. 3 will result in using the values of 3 rows from the input KNIME data table within each query sent to the database for execution. The last query will use <i>NULL</i> for any missing values in the last query e.g. the last query for a table with 5 rows and 2 values per query will have the last value from the table and one <i>NULL</i> in the last query sent to the database.","optional":false},{"name":"Read all","description":"Execute a single query with all values of the selected columns from the input table.","optional":false},{"name":"Aggregate by row","description":"If checked, then the final output table will only contain one row per query. If the query returns multiple results each column values are aggregated into a collection.","optional":false},{"name":"Append input columns","description":"If checked, then the columns from the input table will be appended to the output table. Only columns that are used in the looping SQL statement will be appended.","optional":false},{"name":"Include empty results","description":"If checked, then all empty results will be appended to the output table and represented as Missing Cell. All input rows will be retained.","optional":false},{"name":"Retain all columns","description":"If checked, then all columns including columns that are not used in the looping SQL statement will be appended to the output table.","optional":false},{"name":"Fail on error","description":"If checked, then the node will fail if there is any error. Otherwise, the node will continue executing and all errors will be collected in the second output table.","optional":false}]},{"sectionName":"Input Type Mapping","sectionDescription":"This option allows you to define rules to map from database types to KNIME types.","fields":[{"name":"Mapping by Name","description":"Columns that match the given name (or regular expression) and database type will be mapped to the specified KNIME type.","optional":false},{"name":"Mapping by Type","description":"Columns that match the given database type will be mapped to the specified KNIME type.","optional":false}]},{"sectionName":"Output Type Mapping","sectionDescription":"This option allows you to define rules to map from KNIME types to database types.","fields":[{"name":"Mapping by Name","description":"Columns that match the given name (or regular expression) and KNIME type will be mapped to the specified database type.","optional":false},{"name":"Mapping by Type","description":"Columns that match the given KNIME type will be mapped to the specified database type.","optional":false}]}],"links":[],"kudos":[{"accountId":"account:user:d1f57ef3-a315-49eb-a5c6-7a961c7b9e07","user":"ahmadvarasteh","date":"2022-11-10T09:57:37+00:00"}],"kudosCount":1,"bundleInformation":{"bundleVersion":"5.12.0.v202606171318","bundleName":"KNIME database nodes","bundleSymbolicName":"org.knime.database.nodes","bundleVendor":"KNIME AG, Zurich, Switzerland","featureSymbolicName":"org.knime.features.database","featureName":"KNIME Database","featureVersion":"5.12.0.v202606171318","featureVendor":"KNIME AG, Zurich, Switzerland","extensionId":"*0mIkLShcIfCXS7Y-"},"frequentSuccessors":[]}
