Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 1 addition & 127 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,130 +51,4 @@ items:
title: Set Schedule

- url: /cli/
title: CLI
items:
- url: /cli/installation/
title: Installation
- url: /cli/getting-started/
title: Getting Started
- url: /cli/structure/
title: Structure
- url: /cli/commands/
title: Commands
items:
- url: /cli/commands/help/
title: help
- url: /cli/commands/status/
title: status
- url: /cli/commands/sync/
title: sync
items:
- url: /cli/commands/sync/init/
title: init
- url: /cli/commands/sync/pull/
title: pull
- url: /cli/commands/sync/push/
title: push
- url: /cli/commands/sync/diff/
title: diff
- url: /cli/commands/ci/
title: ci
items:
- url: /cli/commands/ci/workflows/
title: workflows
- url: /cli/commands/local/
title: local
items:
- url: /cli/commands/local/create/
title: create
items:
- url: /cli/commands/local/create/config/
title: config
- url: /cli/commands/local/create/row/
title: row
- url: /cli/commands/local/persist/
title: persist
- url: /cli/commands/local/encrypt/
title: encrypt
- url: /cli/commands/local/validate/
title: validate
items:
- url: /cli/commands/local/validate/config/
title: config
- url: /cli/commands/local/validate/row/
title: row
- url: /cli/commands/local/validate/schema/
title: schema
- url: /cli/commands/local/fix-paths/
title: fix-paths
- url: /cli/commands/remote/
title: remote
items:
- url: /cli/commands/remote/create/
title: create
items:
- url: /cli/commands/remote/create/branch/
title: branch
- url: /cli/commands/remote/create/bucket/
title: bucket
- url: /cli/commands/remote/file/
title: file
items:
- url: /cli/commands/remote/file/download/
title: download
- url: /cli/commands/remote/file/upload/
title: upload
- url: /cli/commands/remote/job/
title: job
items:
- url: /cli/commands/remote/job/run/
title: run
- url: /cli/commands/remote/table/
title: table
items:
- url: /cli/commands/remote/table/create/
title: create
- url: /cli/commands/remote/table/upload/
title: upload
- url: /cli/commands/remote/table/download/
title: download
- url: /cli/commands/remote/table/preview/
title: preview
- url: /cli/commands/remote/table/detail/
title: detail
- url: /cli/commands/remote/table/import/
title: import
- url: /cli/commands/remote/table/unload/
title: unload
- url: /cli/commands/remote/workspace/
title: workspace
items:
- url: /cli/commands/remote/workspace/create/
title: create
- url: /cli/commands/remote/workspace/delete/
title: delete
- url: /cli/commands/remote/workspace/detail/
title: detail
- url: /cli/commands/remote/workspace/list/
title: list
- url: /cli/commands/dbt/
title: dbt
items:
- url: /cli/commands/dbt/init/
title: init
- url: /cli/commands/dbt/generate/
title: generate
items:
- url: /cli/commands/dbt/generate/profile/
title: profile
- url: /cli/commands/dbt/generate/sources/
title: sources
- url: /cli/commands/dbt/generate/env/
title: env
- url: /cli/github-integration/
title: GitHub Integration
- url: /cli/devops-use-cases/
title: DevOps Use Cases
- url: /cli/dbt/
title: dbt

title: CLI (moved)
15 changes: 2 additions & 13 deletions cli/commands/ci/index.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
---
title: CI Command
permalink: /cli/commands/ci/
redirect_to: https://github.com/keboola/keboola-as-code
---

* TOC
{:toc}

Commands to manage the CI/CD pipeline.

```
kbc ci [command]
```

|---
| Command | Description
|-|-|-
| [kbc ci workflows](/cli/commands/ci/workflows/) | Generate workflows for [GitHub Actions integration](/cli/github-integration/). |
The Keboola as Code CLI documentation has been retired. The tool itself lives at [keboola/keboola-as-code](https://github.com/keboola/keboola-as-code). This page's content remains in this repository's git history.
68 changes: 2 additions & 66 deletions cli/commands/ci/workflows/index.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,7 @@
---
title: Workflows
permalink: /cli/commands/ci/workflows/
redirect_to: https://github.com/keboola/keboola-as-code
---

* TOC
{:toc}

**Generate workflows for [GitHub Actions integration](/cli/github-integration/).**

```
kbc ci workflows [flags]
```

You will be prompted to choose which workflows you want to generate:
- `validate` - validates all branches on change
- `push` - pushes each change in the main branch to the project
- `pull` - pulls the main branch from the project every five minutes

## Options

`--ci-main-branch <string>`
: Name of the main branch for push/pull workflows (default "main")

`--ci-pull <bool>`
: Create a workflow to sync the main branch from the project every five minutes (default true)

`--ci-push <bool>`
: Create a workflow to push changes in the main branch to the project (default true)

`--ci-validate <bool>`
: Create a workflow to validate all branches on change to a GitHub branch (default true)

[Global Options](/cli/commands/#global-options)

## Example

```
➜ kbc workflows

Please confirm the GitHub Actions you want to generate.

? Generate "validate" workflow?
All GitHub branches will be validated on change. Yes

? Generate "push" workflow?
Each change in the main GitHub branch will be pushed to the project. Yes

? Generate "pull" workflow?
The main GitHub branch will be synchronized every five minutes.
If a change is found, a new commit is created and pushed. Yes

? Please select the main GitHub branch name: main

Generating CI workflows ...
Created file ".github/actions/install/action.yml".
Created file ".github/workflows/validate.yml".
Created file ".github/workflows/push.yml".
Created file ".github/workflows/pull.yml".

CI workflows have been generated.
Feel free to modify them.

Please set the secret KBC_STORAGE_API_TOKEN in the GitHub settings.
See: https://docs.github.com/en/actions/reference/encrypted-secrets
```

## Next Steps

- [All Commands](/cli/commands/)
- [GitHub Integration](/cli/github-integration/)
The Keboola as Code CLI documentation has been retired. The tool itself lives at [keboola/keboola-as-code](https://github.com/keboola/keboola-as-code). This page's content remains in this repository's git history.
64 changes: 2 additions & 62 deletions cli/commands/dbt/generate/env/index.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,7 @@
---
title: Generate Env Command
permalink: /cli/commands/dbt/generate/env/
redirect_to: https://github.com/keboola/keboola-as-code
---

* TOC
{:toc}

**Generates sources in the dbt project directory.**

```
kbc dbt generate sources [flags]
```

The command must be run in a directory with a dbt project (i.e., containing `dbt_project.yml`) or its subdirectory.

The command outputs commands to create environment variables from a selected existing Snowflake workspace.

See the [introduction to dbt support](/cli/dbt/) for more information.

## Options

`-H, --storage-api-host <string>`
: Storage API host, e.g., "connection.keboola.com"

`-T, --target-name <string>`
: Target name of the profile

`-W, --workspace-id <string>`
: ID of the workspace to use

[Global Options](/cli/commands/#global-options)

## Examples

```
➜ kbc dbt generate env

Please enter the Keboola Storage API host, e.g., "connection.keboola.com".
? API host: connection.north-europe.azure.keboola.com


Please enter the Keboola Storage API token. The value will be hidden.
? API token: **************************************************


Please enter the target name.
Allowed characters: a-z, A-Z, 0-9, "_".
? Target Name: target1


? Workspace: dbt_workspace (12345678)

Commands to set the environment for the dbt target:
export DBT_KBC_TARGET1_TYPE=snowflake
export DBT_KBC_TARGET1_SCHEMA=WORKSPACE_123456
export DBT_KBC_TARGET1_WAREHOUSE=KEBOOLA_PROD_SMALL
export DBT_KBC_TARGET1_DATABASE=KEBOOLA_1234
export DBT_KBC_TARGET1_ACCOUNT=keboola.west-europe.azure
export DBT_KBC_TARGET1_USER=KEBOOLA_WORKSPACE_123456
export DBT_KBC_TARGET1_PASSWORD=abcd123456
```

## Next Steps

- [dbt generate](/cli/commands/dbt/generate/)
- [Introduction to dbt support](/cli/dbt/)
The Keboola as Code CLI documentation has been retired. The tool itself lives at [keboola/keboola-as-code](https://github.com/keboola/keboola-as-code). This page's content remains in this repository's git history.
19 changes: 2 additions & 17 deletions cli/commands/dbt/generate/index.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
---
title: Generate Command
permalink: /cli/commands/dbt/generate/
redirect_to: https://github.com/keboola/keboola-as-code
---

* TOC
{:toc}

**Work with dbt inside your repository.**

The commands must be run in a directory with a dbt project (i.e., containing `dbt_project.yml`) or its subdirectory.

```
kbc dbt generate [command]
```

|---
| Command | Description
|-|-|-
| [kbc dbt generate profile](/cli/commands/dbt/generate/profile/) | Generate profiles for use with dbt. |
| [kbc dbt generate sources](/cli/commands/dbt/generate/sources/) | Generate sources for use with dbt. |
| [kbc dbt generate env](/cli/commands/dbt/generate/env/) | Generate environment variables for use with dbt. |
The Keboola as Code CLI documentation has been retired. The tool itself lives at [keboola/keboola-as-code](https://github.com/keboola/keboola-as-code). This page's content remains in this repository's git history.
55 changes: 2 additions & 53 deletions cli/commands/dbt/generate/profile/index.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,7 @@
---
title: Generate Profile Command
permalink: /cli/commands/dbt/generate/profile/
redirect_to: https://github.com/keboola/keboola-as-code
---

* TOC
{:toc}

**Generates a profile file in the dbt project directory.**

```
kbc dbt generate profile [flags]
```

The command must be run in a directory with a dbt project (i.e., containing `dbt_project.yml`) or its subdirectory.

The command creates a `profiles.yml` file if it does not exist yet and prepares outputs for the selected target.

See the [introduction to dbt support](/cli/dbt/) for more information.

## Options

`-T, --target-name <string>`
: Target name of the profile

[Global Options](/cli/commands/#global-options)

## Examples

```
➜ kbc dbt generate profile -T target1

Profile stored in "profiles.yml".
```

The generated `profiles.yml`:

{% raw %}
```yaml
TestProject:
target: target1
outputs:
target1:
account: '{{ env_var("DBT_KBC_TARGET1_ACCOUNT") }}'
database: '{{ env_var("DBT_KBC_TARGET1_DATABASE") }}'
password: '{{ env_var("DBT_KBC_TARGET1_PASSWORD") }}'
schema: '{{ env_var("DBT_KBC_TARGET1_SCHEMA") }}'
type: '{{ env_var("DBT_KBC_TARGET1_TYPE") }}'
user: '{{ env_var("DBT_KBC_TARGET1_USER") }}'
warehouse: '{{ env_var("DBT_KBC_TARGET1_WAREHOUSE") }}'
send_anonymous_usage_stats: false
```
{% endraw %}

## Next Steps

- [dbt generate](/cli/commands/dbt/generate/)
- [Introduction to dbt support](/cli/dbt/)
The Keboola as Code CLI documentation has been retired. The tool itself lives at [keboola/keboola-as-code](https://github.com/keboola/keboola-as-code). This page's content remains in this repository's git history.
Loading
Loading