是否可以在不指定文件名列表的情况下使用 Oracle 中的外部 table 读取多个 csv?
can multiple csv's can be read using external table in oracle without specifying list of file names?
我有 150 个奇怪的 csv 文件,但文件名可能会有所不同。
所以我想知道在外部 table 概念中我们是否可以在我们提供文件名列表的地方使用 *.csv。
位置 (*.csv)
来自文档:
LOCATION 子句允许您指定一个或多个外部数据源。通常 location_specifier 是一个文件,但不一定是。 Oracle 数据库不解释此子句。由访问驱动程序在外部数据的上下文中解释此信息。
那么您自己测试时发生了什么?
根据 this article,您可以从 12c Release 1(未测试)开始:
A number of minor usability improvements have been made to the
ORACLE_LOADER access driver to make external table creation simpler.
The LOCATION clause now accepts wildcards. An "*" matches multiple
characters, while a "?" matches a single character.
LOCATION ('emp_ext*.dmp')
LOCATION ('emp_ext?.dmp')
我有 150 个奇怪的 csv 文件,但文件名可能会有所不同。 所以我想知道在外部 table 概念中我们是否可以在我们提供文件名列表的地方使用 *.csv。
位置 (*.csv)
来自文档:
LOCATION 子句允许您指定一个或多个外部数据源。通常 location_specifier 是一个文件,但不一定是。 Oracle 数据库不解释此子句。由访问驱动程序在外部数据的上下文中解释此信息。
那么您自己测试时发生了什么?
根据 this article,您可以从 12c Release 1(未测试)开始:
A number of minor usability improvements have been made to the ORACLE_LOADER access driver to make external table creation simpler. The LOCATION clause now accepts wildcards. An "*" matches multiple characters, while a "?" matches a single character.
LOCATION ('emp_ext*.dmp') LOCATION ('emp_ext?.dmp')