data management
slug: reference-output-commandManages the routing and storage of processing results from DAZL steps, providing a unified mechanism to direct output to various destinations. Acts as the central output management system for the entire DAZL pipeline.
output parameter to specify its output destinationoutput: customerSegments # Stores in $work['customerSegments']
output:
target: target_identifier
type: array|html|sql|api
options: {} # Type-specific options
type: array)output:
target: filteredCustomers
type: arraytype: html)output:
target: customerDashboard
type: htmltype: sql)connection: Database connection identifiermode: insert, update, upsert, or replacekey_columns: Columns used for updates/upsertsbatch_size: Number of records per batch operationoutput:
target: customer_segments
type: sql
options:
connection: analytics_db
mode: upsert
key_columns: [customer_id]type: api)method: HTTP method (POST, PUT, etc.)headers: HTTP headerstransform: Transformation function for output dataauth: Authentication detailsoutput:
target: "https://api.example.com/v1/insights"
type: api
options:
method: POST
headers:
Content-Type: application/json
Authorization: "Bearer ${API_TOKEN}"The output manager uses the step's outputType property to determine the appropriate destination:
outputType: 'work' → Routes to work arraysoutputType: 'html' → Routes to HTML reportsWhen no output is specified, the system generates names automatically:
_result_N (where N is a sequential number)_report_N (where N is a sequential number)filter:
dataset: salesData
where: "region = 'North'"
output: northRegionSales
chart:
dataset: productSales
type: bar
x_axis: product
y_axis: revenue
output:
target: productPerformance
type: html
calculate:
dataset: customerMetrics
assign:
lifetime_value: "total_purchases * avg_order_value * 1.5"
churn_risk: "days_since_last_order > 90 ? 'high' : 'low'"
output:
target: customer_metrics
type: sql
options:
connection: crm_db
mode: update
key_columns: [customer_id]