Log
Log the current status of the dataframe.
Print the current status of the dataframe. Only a sample of rows is logged.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
columns | (Optional, default all columns) List of specific columns to log. | array, null | null | No |
| Options | ||||
write | (Optional) Allows for an intermediate output to a file/dataframe/database etc. | array, null | null | No |
warning | Log a warning to the console. | string, null | null | No |
info | Log info to the console. | string, null | null | No |
log_data | Whether to log a sample of the contents of the dataframe. Default True if not logging to a write, error, warning or info. Default False otherwise. | boolean, null | null | No |
error | Log an error to the console. | string | — | No |
| Conditions | ||||
if | Condition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}. | string | — | No |
where | Filter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'. | string | — | No |
where_params | Values used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name. | array, object | — | No |
Examples
wrangles:
- log: {}
Logging side-effect; no tabular input sample.
Logs a sample of rows or status information to the configured destination.
wrangles:
- log:
columns:
- column1
- column2
Logging side-effect; no tabular input sample.
Logs a sample of rows or status information to the configured destination.
wrangles:
- log:
write:
- file:
name: output/filepath
columns:
- column 1
- column 2
Logging side-effect; no tabular input sample.
Logs a sample of rows or status information to the configured destination.
| Variable | Function |
|---|---|
${column_count} | Number of columns. |
${columns} | List of all columns. |
${df} | Current dataframe. |
${row_count} | Number of visible rows processed in each batch. |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 80 |
| Catalog key | log |
| Recipe key | log |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | No |
| Recipe Writer exclusion | Operational logging steps are not authored in the baseline. |
| Namespace | Root-level |
| Documentation group | utility |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.main.log |
| Legacy UUID | 6177808e-aa2d-4d0b-8385-858b16948a5d |
Sources