Local Target#
The local target writes the output of a mapping into some local files.
Example:#
targets:
csv_export:
kind: local
mapping: some_mapping
format: "csv"
filename: "${export_file}"
delimiter: ","
quote: "\""
escape: "\\"
header: "true"
Fields#
kind(mandatory) (string):localdescription(optional) (type: string): Optional descriptive text of the build targetmapping(mandatory) (string): Specifies the name of the input mapping to be countedfilename(mandatory) (string):encoding(optional) (string) (default: “UTF-8”):header(optional) (boolean) (default: true):newline(optional) (string) (default: “\n”):delimiter(optional) (string) (default: “,”):quote(optional) (string) (default: “””):escape(optional) (string) (default: “"):columns(optional) (list) (default: []):
Supported Execution Phases#
BUILD- build the target files containing recordsVERIFY- verifies that the target file existsTRUNCATE- removes the target fileDESTROY- removes the target file, equivalent toTRUNCATE
Read more about execution phases.
Provided Metrics#
The relation target also provides some metric containing the number of records written:
Metric
target_recordswith the following set of attributesname- The name of the targetcategory- Always set totargetkind- Always set tolocalnamespace- Name of the namespace (typicallydefault)project- Name of the projectversion- Version of the project
See Execution Metrics for more information how to use these metrics.