Skip to content
Open
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
20 changes: 10 additions & 10 deletions src/content/docs/transformations/code-patterns/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Code Patterns
slug: 'transformations/code-patterns'
---
title: Code Patterns
slug: 'transformations/code-patterns'
---





Code Pattern is a special type of [component](/components/) that

- generates code based on [parameters](#parameters-form), and
Expand Down Expand Up @@ -54,16 +54,16 @@ Follow the instructions at the top of the configuration page.

The user interface of the configuration consists of the following:
1. Instructions on how to set up the code pattern correctly
2. [Table Input Mapping](https://help.keboola.com/transformations/mappings/#table-input-mapping)
3. [Table Output Mapping](https://help.keboola.com/transformations/mappings/#table-output-mapping)
2. [Table Input Mapping](/transformations/mappings/#table-input-mapping)
3. [Table Output Mapping](/transformations/mappings/#table-output-mapping)
4. [Parameters Form](#parameters-form) of the code pattern
5. **Generate Code** button
6. Read-only [generated code](#generated-code)

### Input and Output Mapping

Table [Input](https://help.keboola.com/transformations/mappings/#table-input-mapping)
and [Output](https://help.keboola.com/transformations/mappings/#table-output-mapping) Mapping can be created either
Table [Input](/transformations/mappings/#table-input-mapping)
and [Output](/transformations/mappings/#table-output-mapping) Mapping can be created either
- **manually** as in ordinary transformations, or
- **automatically**, generated together with the code if the component supports it.

Expand All @@ -90,5 +90,5 @@ on the code pattern component with the actual parameters. The result is then sav

![Screenshot -- Generated Code](/transformations/code-patterns/overview-6-code.png)

After the code has been generated, you can [run the job](https://help.keboola.com/management/jobs/#running-jobs) the standard way.
After the code has been generated, you can [run the job](/management/jobs/#running-jobs) the standard way.

34 changes: 17 additions & 17 deletions src/content/docs/transformations/dbt/cli/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ Let's set up the local development with [Keboola CLI](https://developers.keboola

It is easy on Mac with [homebrew](https://docs.brew.sh/Installation.html) support (other platforms covered in the [documentation](https://developers.keboola.com/cli/installation/)):

```java
```bash
brew tap keboola/keboola-cli
brew install keboola-cli
kbc --version
```

If you already have CLI, make sure you have the most updated version:

```java
```bash
brew upgrade keboola-cli
kbc --version
```

![](imgs/2772467715.png){: width="100%" }
![](imgs/2772467715.png)

**You will then gain access to dbt-related commands within Keboola CLI!**

Expand Down Expand Up @@ -53,26 +53,26 @@ The user is in the folder with the cloned dbt project and can run the following

### Example

![](imgs/2770010115.jpg){: width="100%" }
![](imgs/2770010115.jpg)

Store credentials to your zsh env profile (or your respective environment):
---------------------------------------------------------------------------

The file is located (Unix) in `~/.zshrc`

![](imgs/2770206732.png){: width="100%" }
![](imgs/2770206732.png)

Then you can run dbt locally against the project storage, safely develop and test your code.

As part of the init command, CLI will create all sources from storage buckets. A storage bucket is a source file containing tables:

![](imgs/2777448699.png){: width="100%" }
![](imgs/2777448699.png)

*Note: Please note that `_timestamp` is automatically filled, alongside `primary keys` and corresponding `tests` for primary keys (`unique` and `not_null` tests).*

### Run Test Debug

```java
```bash
dbt debug -t beer_demo --profiles-dir .
```

Expand All @@ -84,29 +84,29 @@ dbt debug -t beer_demo --profiles-dir .
* We are using local profiles; they are using environmental variables stored before.


![](imgs/2769649699.png){: width="100%" }
![](imgs/2769649699.png)

You should see green in all steps:

![](imgs/2770239505.png){: width="100%" }
![](imgs/2770239505.png)

dbt Run
-------

For the script alteration, the only check/change you have to make with off-the-shelf scripts is to alter source definitions to match sources:

![](imgs/2769879073.png){: width="100%" }
![](imgs/2769879073.png)


![](imgs/2770042889.png){: width="100%" }
![](imgs/2770042889.png)

To execute the dbt:

```java
```bash
dbt run -t beer_demo --profiles-dir .
```

![](imgs/2769879081.png){: width="100%" }
![](imgs/2769879081.png)

### Other Commands for Future Use

Expand All @@ -124,7 +124,7 @@ dbt run -t beer_demo --profiles-dir .
* **Example** (non-interactive mode):


![](imgs/2770010121.jpg){: width="100%" }
![](imgs/2770010121.jpg)

`kbc dbt generate sources`
--------------------------
Expand All @@ -135,7 +135,7 @@ dbt run -t beer_demo --profiles-dir .

* **Example** (non-interactive mode)

![](imgs/2770010127.jpg){: width="100%" }
![](imgs/2770010127.jpg)

`kbc dbt generate env`
----------------------
Expand All @@ -146,7 +146,7 @@ dbt run -t beer_demo --profiles-dir .

* **Example**

![](imgs/2770010133.jpg ){: width="100%" }
![](imgs/2770010133.jpg )

### Workspaces Support

Expand All @@ -161,4 +161,4 @@ dbt run -t beer_demo --profiles-dir .

* **Example** (non-interactive mode)

![](imgs/2770010139.jpg){: width="100%" }
![](imgs/2770010139.jpg)
18 changes: 9 additions & 9 deletions src/content/docs/transformations/dbt/cloud/cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ slug: 'transformations/dbt/cloud'

dbt Cloud is supported via dedicated components. You can find them in the menu section **Components**:

![](imgs/2777448719.png){: width="100%" }
![](imgs/2777448719.png)

* `kds-team.ex-dbt-cloud-api` for extracting data from dbt Cloud API

Expand All @@ -14,31 +14,31 @@ dbt Cloud is supported via dedicated components. You can find them in the menu s

## dbt Cloud Trigger

![](imgs/2776563988.png){: width="100%" }
![](imgs/2776563988.png)

The component configuration is pretty straightforward. You must authorize the component by providing your `Account ID`, `Job ID`, and `API key`.

The component generates a status table called `dbt_cloud_trigger` storing the job trigger API response:

![](imgs/2776269020.png){: width="100%" }
![](imgs/2776269020.png)

When **Wait for result** is selected, the component polls the status until the job ends. The component has a default wait time limit that can be optionally set to a different time. When the option **Wait for result** is used, the component extracts artifacts, stores them in the file storage, and additionally, produces a job result API call table:

![](imgs/2776564000.png){: width="100%" }
![](imgs/2776564000.png)

Both tables can be found in the storage, or accessed directly from the job result:

![](imgs/2777710848.png){: width="100%" }
![](imgs/2777710848.png)

Artifacts can be found in the storage - files - search by tag:

![](imgs/2777448746.png){: width="100%" }
![](imgs/2777448746.png)

Search by tag (component type or configuration ID):

`tags:"componentId-kds-team.app-dbt-cloud-job-trigger"`

![](imgs/2776269036.png){: width="100%" }
![](imgs/2776269036.png)

**Tip:**: Those files can be also easily [retrieved externally via the API](https://api.keboola.com/?service=storage#get-/v2/storage/branch/-branchId-/files) or from an integrated Jupyter workspace for further analysis.

Expand All @@ -61,10 +61,10 @@ The purpose of this data source connector is to extract and store the [dbt Cloud

To configure the source connector, enter the API token and select a default configuration:

![](imgs/2777448752.png){: width="100%" }
![](imgs/2777448752.png)

You can access the data from Storage, or directly from the job detail screen:

![](imgs/2777710857.png){: width="100%" }
![](imgs/2777710857.png)

***Note:** The data source connector utilizes our powerful Generic Extractor. In case you want to customize the extraction, select just some endpoints, etc. You can switch to the JSON schema and edit the configuration manually.*
6 changes: 3 additions & 3 deletions src/content/docs/transformations/dbt/flows/flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ slug: 'transformations/dbt/flows'

All dbt related components behave in the same way as any other component in Keboola does. They can be added to the flows to define orchestrated data pipelines, add schedule and notifications:

![](imgs/2776269000.jpeg){: width="100%" }
![](imgs/2776269000.jpeg)

![](imgs/2776269006.png){: width="100%" }
![](imgs/2776269006.png)

![](imgs/2776269012.png){: width="100%" }
![](imgs/2776269012.png)
2 changes: 1 addition & 1 deletion src/content/docs/transformations/dbt/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ All components can be used in the flows, thus orchestrated with data pipeline de
<em>Customers use their own external infrastructure and development environments</em>
</p>
</td>
<td class="confluenceTd">
<td>
<p style="text-align: center;">
<em>Development is provided by dbt Cloud and the execution is defined by users on their own infrastructure</em>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ slug: 'transformations/dbt/transformation'

## Configuration

![](imgs/dbt-transformation-overview.webp){: width="100%" }
![](imgs/dbt-transformation-overview.webp)

### Database Connection

Expand All @@ -15,21 +15,21 @@ slug: 'transformations/dbt/transformation'

The required connection parameters for your remote data warehouse vary depending on the selected backend type. Use the **Run Debug** option in the right panel to validate the connection using the entered parameters.

![](imgs/dbt-transformation-db-connection.webp){: width="100%" }
![](imgs/dbt-transformation-db-connection.webp)

### dbt Project Repository

First, you must define a repository by specifying the URL (ending with GIT) and entering the access credentials if required.

![](imgs/2776563898.png){: width="100%" }
![](imgs/2776563898.png)

After saving a configuration, click **Load Branches** to select the desired branch. Don't forget to click **Save**.

![](imgs/2776563904.png){: width="100%" }
![](imgs/2776563904.png)

### Execution Steps

![](imgs/2740748169.png){: width="100%" }
![](imgs/2740748169.png)

Select the desired execution steps, then edit or rearrange them as needed.

Expand All @@ -41,11 +41,11 @@ For example, you can use the following command:
dbt run --select "path:marts/finance,tag:nightly,config.materialized:table" --full-refresh
```

![](imgs/dbt-transformation-step-edit.webp){: width="100%" }
![](imgs/dbt-transformation-step-edit.webp)

### Freshness
If you run the `dbt source freshness` step in your project, you can set time limits for displaying warnings and errors. Both time limits can be enabled and configured independently.
![](imgs/2740735193.png){: width="100%" }
![](imgs/2740735193.png)

### Artifacts
Artifacts generated by dbt (all steps except `dbt deps` and `dbt debug`) are automatically stored in Keboola Storage. Depending on the configuration, they are saved either as a compressed ZIP file or as individual files.
Expand All @@ -56,29 +56,29 @@ Artifacts generated by dbt (all steps except `dbt deps` and `dbt debug`) are aut

This is a specific configuration needed for the Keboola dbt component. Define which tables will be imported within storage. This configuration uses a standard output mapping UI element with configuration options, such as incremental or full load, filters, etc.

![](imgs/2776563928.png){: width="100%" }
![](imgs/2776563928.png)

## Running transformation

Before running the dbt transformation, you can configure additional parameters (such as the dbt Core version, backend size, and number of threads), run debug command, or view generated project documentation.

![](imgs/dbt-transformation-run.webp){: width="50%" }
![](imgs/dbt-transformation-run.webp)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Removal of {: width="50%"} may change intended image sizing

Two images in dbt/transformation/transformation.md used {: width="50%" } (lines 65 and 110), while most others used {: width="100%" }. The kramdown syntax didn't work in Astro anyway, so removing it is correct. However, these two images were intentionally sized at 50% in the original Jekyll site, suggesting they may appear oversized at their natural dimensions. If the images need constraining, Astro/Starlight's built-in <img> or a wrapper style in src/styles/custom.css could be used instead.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid observation, but the {: width="50%" } was already non-functional in Starlight — it rendered as literal visible text next to the image (not as a resize directive). So removing it doesn't change image display behavior; images were already showing at full/natural width.

If these images genuinely need constraining to 50%, that would require a Starlight-native approach (e.g., wrapping in a <div style="max-width:50%"> or a CSS class in custom.css). That's a separate content decision (needs_human=yes in my audit) — flagged for a future pass.


### Run Debug

To verify that your credentials and project setup are correct, you can run a debug job. This is the same as running `dbt debug` from the command prompt.

The **Run debug** button will create a separate job with standard logging, exposing the results of the dbt debug command:

![](imgs/2776563946.png){: width="100%" }
![](imgs/2776563946.png)

## dbt Project Documentation

When you press **dbt Project Documentation**, the job will generate the necessary files within artifacts to power documentation. The dbt documentation is then accessible via the button from the main configuration screen.

Clicking the button synchronously generates the documentation in a popup:

![](imgs/2776269049.png){: width="100%" }
![](imgs/2776269049.png)

## Manually Triggering dbt Transformation

Expand All @@ -101,19 +101,19 @@ When you manually run a dbt transformation, a new job is triggered with standard
* Record of producing and storing artifacts


![](imgs/2776563952.png){: width="100%" }
![](imgs/2776563952.png)

You can also access all configuration jobs from the configuration screen and the **Jobs** menu section.

![](imgs/2776563958.png){: width="100%" }
![](imgs/2776563958.png)

![](imgs/2776563964.png){: width="50%" }
![](imgs/2776563964.png)

## Discover

The **Discover** tab is designed to provide more information about the run. Keboola plans to expand this tab to offer additional insights. Currently, it provides the timeline designed to visually display the duration of each model build.

![](imgs/2777448784.png){: width="100%" }
![](imgs/2777448784.png)

## Profiles and Target

Expand All @@ -139,7 +139,7 @@ default:
***Note:** The values of environment variables are provided automatically based on the database connection settings or the use of Keboola Storage.*

If needed, you can use a `profiles.yml` file committed in your dbt project repository for Remote DWH components and set the target according to your requirements. In this case, you must use the environment variables mentioned above in the generated `profiles.yml` and specify the target in each executed step. Your committed `profiles.yml` file will be merged with the automatically generated version.
![](imgs/2740663016.png){: width="100%" }
![](imgs/2740663016.png)

:::caution
Important: Never commit sensitive information such as access credentials or passwords to the repository.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/transformations/python-plain/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ it immediately. The following two examples show two ways of reading and manipula

## Dynamic Backends
If you have a large amount of data in databases and complex queries, your transformation might run for a couple of hours.
To speed it up, you can change the backend size in the configuration. Python transformations suport the following sizes:
To speed it up, you can change the backend size in the configuration. Python transformations support the following sizes:
- XSmall
- Small _(default)_
- Medium
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/transformations/r-plain/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ warning = function(w) {}

## Dynamic Backends
If you have a large amount of data in databases and complex queries, your transformation might run for a couple of hours.
To speed it up, you can change the backend size in the configuration. R transformations suport the following sizes:
To speed it up, you can change the backend size in the configuration. R transformations support the following sizes:
- XSmall
- Small _(default)_
- Medium
Expand All @@ -103,7 +103,7 @@ Scaling up the backend size allocates more resources to speed up your transforma
***Note:** Dynamic backends are not available to you if you are on the [Free Plan (Pay As You Go)](/management/payg-project/).*

## Development Tutorial
We recommend that you create an [R Workspace](/transformations/workspace) with the same
We recommend that you create an [R Workspace](/workspace/) with the same
input mapping your transformation will use. This is the fastest way to develop your transformation code.

**Tip:** Limit the number of rows you read in from the CSV files:
Expand Down
Loading
Loading