从 Table 中选择所有记录,其中部件号与 CSV 文件中的部件号列表相匹配
Selecting all Records from Table where the Part Number matches list of Part Numbers in CSV file
我想要 Select 来自 Oracle 数据库 Table 的所有记录,其中部件号与存储在 CSV 文件中的部件号列表相匹配。在 Knime 中实现它的最佳方法是什么?
首先,使用 CSV Reader
或 File Reader
节点 - 后者通常是更好的选择,但请检查 CSV reader 的文档,以防它更适合您的要求-
Use this node if the workflow is used in a server or batch environment and the input files structure change between different invocations. In particular, this includes a variable number of input columns.
和
Note: If you are only using the desktop version of KNIME and your workflow is not meant to be used in a batch or server environment use the File Reader node. The file reader node has more configuration options and guesses meaningful default settings as it scans the input file during node configuration (in the dialog).
首先将您的 csv 文件读入 KNIME table
然后,使用Database Looping
节点——你需要建立一个到你的数据库的连接,然后从默认的
修改SQL语句
SELECT * FROM <table_name> WHERE <table_column> IN ('#PLACE_HOLDER_DO_NOT_EDIT#')
将 <>
中的占位符替换为正确的 table 和数据库中零件号的列名,然后从 table 中选择零件号列您的 csv 文件位于 Loop Settings
下节点配置 window 底部的 Column Selection
设置中。为了提高效率,您几乎肯定会希望将 No of Values per Query
设置增加到一个更大的数字,例如250 或 500 - 你需要试验你的数据库能容忍什么,因为 SQL 语句的最大长度是有限制的,这将通过将 #PLACE_HOLDER_DO_NOT_EDIT#
替换为您的部件号
我想要 Select 来自 Oracle 数据库 Table 的所有记录,其中部件号与存储在 CSV 文件中的部件号列表相匹配。在 Knime 中实现它的最佳方法是什么?
首先,使用 CSV Reader
或 File Reader
节点 - 后者通常是更好的选择,但请检查 CSV reader 的文档,以防它更适合您的要求-
Use this node if the workflow is used in a server or batch environment and the input files structure change between different invocations. In particular, this includes a variable number of input columns.
和
Note: If you are only using the desktop version of KNIME and your workflow is not meant to be used in a batch or server environment use the File Reader node. The file reader node has more configuration options and guesses meaningful default settings as it scans the input file during node configuration (in the dialog).
首先将您的 csv 文件读入 KNIME table
然后,使用Database Looping
节点——你需要建立一个到你的数据库的连接,然后从默认的
SELECT * FROM <table_name> WHERE <table_column> IN ('#PLACE_HOLDER_DO_NOT_EDIT#')
将 <>
中的占位符替换为正确的 table 和数据库中零件号的列名,然后从 table 中选择零件号列您的 csv 文件位于 Loop Settings
下节点配置 window 底部的 Column Selection
设置中。为了提高效率,您几乎肯定会希望将 No of Values per Query
设置增加到一个更大的数字,例如250 或 500 - 你需要试验你的数据库能容忍什么,因为 SQL 语句的最大长度是有限制的,这将通过将 #PLACE_HOLDER_DO_NOT_EDIT#
替换为您的部件号