Locations With Wildcards
The locations that include paths may include wildcards through use of a special syntax in the URL.
The following table describes the wildcard conventions:
Description | |
---|---|
? | Matches a single character. |
* | Matches any sequence of characters. |
** | Recurses through subdirectories. |
For instance, given the following keys in the S3 bucket s3://raw-tutorial/
:
ls-example/file1.csv
ls-example/file2.csv
ls-example/file1.json
ls-example/jsons/file1.json
ls-example/jsons/file2.json
ls-example/jsons/not-json.csv
A path that includes a wildcard, such as "s3://raw-tutorial/ls-example/*.csv"
would match:
"s3://raw-tutorial/ls-example/file1.csv"
,"s3://raw-tutorial/ls-example/file2.csv"
.
A path using a double asterisk (`**`) like `"s3://raw-tutorial/ls-example/**/*.json"` would match:
* `"s3://raw-tutorial/ls-example/file1.json"`,
* `"s3://raw-tutorial/ls-example/jsons/file1.json"`,
* `"s3://raw-tutorial/ls-example/jsons/file2.json"`.
Wildcard paths can be passed as parameters to Location.Ls
and Location.Ll
.
Location.Ll
returns a list of URLs along with their metadata (such as size and modification time) which can be displayed in the output.Location.Ls
returns a list of locations that are intended to be used with read operations likeJson.Read
orCsv.Read
. These items are not meant to be directly rendered in query output.