Skip to content

Commit 25270d8

Browse files
youngsofunBohuTANG
andauthored
docs: note about pattern in copy. (#12951)
* docs: note about pattern in copy. * Update dml-copy-into-table.md --------- Co-authored-by: BohuTANG <overred.shuttler@gmail.com>
1 parent b4f9763 commit 25270d8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

docs/doc/14-sql-commands/10-dml/dml-copy-into-table.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,14 @@ externalLocation ::=
184184

185185
Specify a list of one or more files names (separated by commas) to be loaded.
186186

187-
### PATTERN = 'regex_pattern'
187+
### PATTERN = '<regex_pattern>'
188188

189189
A [PCRE2](https://www.pcre.org/current/doc/html/)-based regular expression pattern string, enclosed in single quotes, specifying the file names to match. Click [here](#loading-data-with-pattern-matching) to see an example. For PCRE2 syntax, see http://www.pcre.org/current/doc/html/pcre2syntax.html.
190190

191+
:::note
192+
Suppose there is a file `@<stage_name>/<path>/<sub_path>`, to include it, `<sub_path>` needs to match `^<regex_pattern>$`.
193+
:::
194+
191195
### FILE_FORMAT
192196

193197
See [Input & Output File Formats](../../13-sql-reference/50-file-format-options.md).

docs/doc/15-sql-functions/112-table-functions/list_stage.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ externalStage ::= @<external_stage_name>[/<path>]
3636
userStage ::= @~[/<path>]
3737
```
3838

39+
### PATTERN
40+
41+
See [COPY INTO table](/14-sql-commands/10-dml/dml-copy-into-table.md).
42+
43+
3944
## Examples
4045

4146
```sql
42-
SELECT * FROM list_stage(location => '@my_stage/', pattern => '.log');
47+
SELECT * FROM list_stage(location => '@my_stage/', pattern => '.*[.]log');
4348
+----------------+------+------------------------------------+-------------------------------+---------+
4449
| name | size | md5 | last_modified | creator |
4550
+----------------+------+------------------------------------+-------------------------------+---------+

0 commit comments

Comments
 (0)