--- title: "Setting globs" slug: "setting-globs" tags: ["Bobsled Transfers", "Public Preview"] updated: 2025-06-12T08:49:02Z published: 2025-06-12T08:49:02Z canonical: "bobsled.com/setting-globs" --- > ## Documentation Index > Fetch the complete documentation index at: https://bobsled.com/llms.txt > Use this file to discover all available pages before exploring further. # Setting globs To guarantee maximum flexibility when creating a data transfer from File storage [sources](/v2/docs/sources), Bobsled supports Glob selection for advanced data selection. This article will describe how to set up Globs in the Bobsled application—including through the Developer mode—, and setting these via the [Bobsled Rest API ↗](https://api.bobsled.com/) --- ## Overview When applying Globs with Bobsled, please consider the following: - Globs are applied in the order they are provided in the array of Globs. This means that the previous `globs` can be overridden. For example, give `["**/*.*", "!**/*.csv", "**/important.csv"]`, the file `important.csv` will be included despite the fact `csv` were excluded in `"!**/*.csv"`. - Positive patterns (e.g. `**/*.csv` or `**/*.*`) add to the results of what will be loaded to the destination, while negative patterns (e.g. `!**/file.csv`) subtract from the results. Therefore, a single negation (e.g. `["!**/file.csv"]`) will never match anything since nothing was added to the results. Use `["**/*.*", "!**/file.csv"]` instead. - Globs are case-sensitive. - Selecting the root folder and targeting the desired subfolders `globs` is slower and more expensive. Whenever possible, use `pathNames` to restrict the transfer to only include the paths that contain the files you need to deliver. - All globs should start with either the bucket’s URL or glob stars (`**`). - For example, consider the source path `gs://bucket-name/user_data/` with the following globs: | **Glob expression** | **Validity** | **Explanation** | | --- | --- | --- | | `"user_data/*.*"` | ✗ Invalid | This won’t match anything because `user_data` is not considered to be at the root. When applying globs, `gs://bucket-name` is regarded as the root. | | `"gs://bucket-name/user_data/**"` | ✔ Valid | All files and folders in the `user_data` folder will be included. | | `"**/user_data/*.csv"` | ✔ Valid | CSV files in the `user_data` folder will be included. | > [!NOTE] > **NOTE:** Bobsled uses the [micromatch ↗](https://github.com/micromatch/micromatch) library to apply globs. All available features in the library are available in Bobsled. If you have any questions, reach out to your account team. --- ## Setup instructions ### Globs via the Rest API 1. In the [Create a transfer ↗](https://api.bobsled.com/reference/post_api-v1-shares-shareid-transfers-1) endpoint, add the `globs` properly in the `transferEntity`: ```json {  "transferEntity": [    {      "entityType": "files",      "pathNames": [        "gs://bucket-name/user_data/ids/"      ],      "globs": ["**/appID001/**/userClicks/*.csv"]    }  ] } ``` ### Globs via the Bobsled Application #### Option 1: Via the path selector 1. From the side panel, select **Shares** 2. Click the **Create** **share** button 3. Choose a File Storage [source](/v2/docs/sources) and a [destination](/v2/docs/destinations) of your choice 4. Click **create transfer** 5. In the wizard, **select the paths** you wish to transfer. Once you select a path, locate and select the **glob** icon (a star with a doc). 6. By default, bobsled sets the “select all” glob expression, `“**/*.*“` , edit it to your desired target. Once no errors are observed, select **save**. Bobsled displays a check icon to provide feedback that it has a glob expression. ![](https://cdn.document360.io/87a415ff-4d6a-4c0c-adbb-26c563a2d9a8/Images/Documentation/Group 13.png) > [!NOTE] > **NOTE:** For Cloud Data Warehouse destinations, if you are merging multiple folders, these must share the same Glob expression(s). 1. Continue with the wizard depending on your destination, review your transfer configuration, and select **Save transfer.** ![](https://cdn.document360.io/87a415ff-4d6a-4c0c-adbb-26c563a2d9a8/Images/Documentation/G3.png) #### Option 2: Via the developer mode 1. From the side panel, select **Shares** 2. Click the **Create** **share** button 3. Choose a File Storage [source](/v2/docs/sources) and a [destination](/v2/docs/destinations) of your choice 4. Click **create transfer** 5. In the wizard, locate and select the **developer mode** toggle. This mode accepts a `JSON` that should be the same shape as the `transferEntity` in the [Bobsled API ↗](https://api.bobsled.com/reference/post_api-v1-shares-shareid-transfers-1) ![](https://cdn.document360.io/87a415ff-4d6a-4c0c-adbb-26c563a2d9a8/Images/Documentation/G5(1).png) 1. In the Developer mode, edit the `transferEntity` body and: - Enter the details for your selection as per the [Bobsled Rest API ↗](https://api.bobsled.com/), or you can select via the path selector and enter this mode. By default, bobsled sets the “select all” glob expression, `“**/*.*“` , edit it to your desired target. 2. When no errors are observed, click Continue to review your transfer configuration. 3. Click **Save transfer** > [!NOTE] > **NOTE:** Bobsled does not allow to switch between modes when there are errors, but allows you to discard the changes you’ve made in ‘Developer mode’ before switching to the interactive mode. --- ## Common Use-Cases with Globs 1. **Include files of a certain extension:** - Example: Include all `.json` files in the selected path. - Glob: `"**/*.json"` 2. **Exclude files of a certain extension:** - Example: Exclude all `.tmp` files from the selected path. - Glob: `"!**/*.tmp"` 3. **Share files from a specific start date with no end date (assuming** `yyyy/mm/dd` **partitioning):** - Example: Include all files from August 1, 2023, onwards. - Glob: `["**/2023/08/{01..31}/**", "**/2023/{09..12}/**", "**/{2024..}/**"]` 4. **Share files from a specific start date with no end date (Hive-style partitioning):** - Example: Include all files from August 1, 2023, onwards, assuming Hive-style partitioning (`/year=yyyy/month=mm/day=dd/`). - Glob: `["**/year=2023/month=08/day={01..31}/**", "**/year=2023/month={09..12}/**", "**/year={2024..}/**"]` 5. **Share files from a specific start date and end date (assuming** `yyyy/mm/dd` **partitioning):** - Example 1: Include files from January 2023. - Glob: `"**/2023/01/**"` - Example 2: Include files from March 1, 2022, to March 31, 2022. - Glob: `"**/2022/03/{01..31}/**"` 6. **Choose a certain partition named after a stock ticker (e.g., stock=ibm):** - Example: Include all files under the partition where `stock=ibm`. - Glob: `"**/stock=ibm/**"` 7. **Choose a given region when paths are named with regions (e.g.,** `/US/`**):** - Example: Include all files under the `/US/` region. - Glob: `"**/US/**"`