Skip to content

Commit bf907b0

Browse files
authored
Merge pull request #371 from keboola/devin/1773215717-kbcignore-field-level-docs
docs: add field-level ignore syntax to .kbcignore documentation
2 parents d458661 + ad73021 commit bf907b0

File tree

1 file changed

+53
-3
lines changed

1 file changed

+53
-3
lines changed

cli/structure/index.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,16 @@ Example:
450450
```
451451
## .kbcignore
452452

453-
You can exclude specific configurations from the sync process by creating a `.kbcignore` file in the `.keboola` directory.
453+
You can exclude specific configurations, configuration rows, or individual fields from the sync process by creating a `.kbcignore` file in the `.keboola` directory.
454454

455-
It is a plain text file where each line specifies a path to a configuration or configuration row in the format
456-
`{component_id}/{configuration_id}/{row_id}`. The `row_id` is optional for [row-based configurations](https://help.keboola.com/components/#configuration-rows).
455+
It is a plain text file where each line specifies either:
456+
457+
- A path to a **configuration or configuration row** to exclude entirely, in the format `{component_id}/{configuration_id}/{row_id}` (the `row_id` is optional for [row-based configurations](https://help.keboola.com/components/#configuration-rows)).
458+
- A **field-level ignore** rule in the format `{component_id}/{configuration_id}:{field_name}`, which excludes a single field from synchronization while keeping the rest of the configuration managed by the CLI.
459+
460+
Comments (lines starting with `#`) and empty lines are ignored.
461+
462+
### Configuration and Row Ignore
457463

458464
Example `.kbcignore` file:
459465

@@ -469,6 +475,50 @@ This excludes:
469475

470476
As a result, the `kbc sync pull` and `kbc sync push` commands will not synchronize these configurations.
471477

478+
### Field-Level Ignore
479+
480+
In addition to ignoring entire configurations or rows, you can ignore **individual fields** within a configuration.
481+
This is useful when you want to manage most of a configuration via the CLI but let a specific field be controlled
482+
exclusively in the Keboola UI (or vice versa).
483+
484+
The syntax is:
485+
486+
```
487+
{component_id}/{configuration_id}:{field_name}
488+
```
489+
490+
Where `field_name` is either:
491+
492+
- A **struct-level field** of the configuration — currently `isDisabled` is supported.
493+
- A **dot-notation content key** referring to a path inside the configuration's `config.json` content, e.g., `schedule.cronTab`.
494+
495+
Example `.kbcignore` with field-level rules:
496+
497+
```
498+
# Ignore the isDisabled flag — let the UI control whether this config is enabled
499+
ex-generic-v2/798412456:isDisabled
500+
501+
# Ignore the cron schedule — let the UI control the schedule timing
502+
keboola.scheduler/801234567:schedule.cronTab
503+
```
504+
505+
Field-level ignore is **bidirectional**:
506+
507+
- **`kbc sync push`**: The remote value of the ignored field is kept. Any local change to that field is discarded before
508+
the diff is computed, so the field is never pushed.
509+
- **`kbc sync pull`**: The local value of the ignored field is kept. Any remote change to that field is discarded before
510+
the diff is computed, so the field is never pulled.
511+
512+
In both cases the rest of the configuration is synchronized normally.
513+
514+
<div class="clearfix"></div><div class="alert alert-info" role="alert">
515+
<p><strong>Note:</strong><br>
516+
The field-level ignore format requires exactly two path segments before the colon
517+
(<code>{component_id}/{configuration_id}</code>). The field name must not be empty or start/end with a dot.</p>
518+
</div>
519+
520+
### Configuration-Level Ignore
521+
472522
**`kbc push` operation**
473523

474524
The `kbc push` command will skip the excluded configurations and will not push them back to the project, even if they exist or have been modified in the local folder structure.

0 commit comments

Comments
 (0)