PageSourceSearch

https://conduitio.github.io/assets/js/67579433.857ef4c5.js

js conduitio.github.io collected 2026-10-03 08:49:44 UTC 9,342 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkconduit_site=self.webpackChunkconduit_site||[]).push([[507],{36601:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>m,default:()=>j,frontMatter:()=>p,metadata:()=>r,toc:()=>f});const r=JSON.parse('{"id":"using/processors/builtin/field.rename","title":"field.rename","description":"Rename a group of fields.","source":"@site/docs/1-using/6-processors/1-builtin/field.rename.mdx","sourceDirName":"1-using/6-processors/1-builtin","slug":"/using/processors/builtin/field.rename","permalink":"/docs/using/processors/builtin/field.rename","draft":false,"unlisted":false,"editUrl":"https://github.com/conduitio/conduitio.github.io/edit/main/docs/1-using/6-processors/1-builtin/field.rename.mdx","tags":[],"version":"current","lastUpdatedAt":1751451129000,"sidebarPosition":12,"frontMatter":{"IMPORTANT":"This file was generated using src/processorgen/main.go. DO NOT EDIT.","title":"field.rename","sidebar_position":12},"sidebar":"docsSidebar","previous":{"title":"field.exclude","permalink":"/docs/using/processors/builtin/field.exclude"},"next":{"title":"field.set","permalink":"/docs/using/processors/builtin/field.set"}}');var i=s(74848),d=s(28453),o=s(82514),a=s.n(o),t=s(44744),l=s(96300),c=s(11470),h=s(19365);const p={IMPORTANT:"This file was generated using src/processorgen/main.go. DO NOT EDIT.",title:"field.rename",sidebar_position:12},m="field.rename",u={},f=[{value:"Description",id:"description",level:2},{value:"Configuration parameters",id:"configuration-parameters",level:2},{value:"Examples",id:"examples",level:2},{value:"Rename multiple fields",id:"rename-multiple-fields",level:3},{value:"Configuration parameters",id:"configuration-parameters-1",level:4},{value:"Record difference",id:"record-difference",level:4}];function x(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",p:"p",pre:"pre",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"fieldrename",children:(0,i.jsx)(n.code,{children:"field.rename"})})}),"\n",(0,i.jsx)(n.p,{children:"Rename a group of fields."}),"\n",(0,i.jsx)(n.h2,{id:"description",children:"Description"}),"\n",(0,i.jsxs)(n.p,{children:["Rename a group of field names to new names. It is not\nallowed to rename top-level fields (",(0,i.jsx)(n.code,{children:".Operation"}),", ",(0,i.jsx)(n.code,{children:".Position"}),",\n",(0,i.jsx)(n.code,{children:".Key"}),", ",(0,i.jsx)(n.code,{children:".Metadata"}),", ",(0,i.jsx)(n.code,{children:".Payload.Before"}),", ",(0,i.jsx)(n.code,{children:".Payload.After"}),")."]}),"\n",(0,i.jsxs)(n.p,{children:["Note that this processor only runs on structured data, if the record contains raw\nJSON data, then use the processor ",(0,i.jsx)(n.a,{href:"/docs/using/processors/builtin/json.decode",children:(0,i.jsx)(n.code,{children:"json.decode"})}),"\nto parse it into structured data first."]}),"\n",(0,i.jsx)(n.h2,{id:"configuration-parameters",children:"Configuration parameters"}),"\n",(0,i.jsxs)(c.A,{groupId:"config-params",children:[(0,i.jsx)(h.A,{value:"yaml",label:"YAML",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'version: 2.2\npipelines:\n  - id: example\n    status: running\n    connectors:\n      # define source and destination ...\n    processors:\n      - id: example\n        plugin: "field.rename"\n        settings:\n          # Mapping is a comma separated list of keys and values for fields and\n          # their new names (keys and values are separated by colons ":").\n          # For example: `.Metadata.key:id,.Payload.After.foo:bar`.\n          # For more information about the format, see [Referencing\n          # fields](https://conduitio.github.io/docs/using/processors/referencing-fields).\n          # Type: string\n          mapping: ""\n          # Whether to decode the record key using its corresponding schema from\n          # the schema registry.\n          # Type: bool\n          sdk.schema.decode.key.enabled: "true"\n          # Whether to decode the record payload using its corresponding schema\n          # from the schema registry.\n          # Type: bool\n          sdk.schema.decode.payload.enabled: "true"\n          # Whether to encode the record key using its corresponding schema from\n          # the schema registry.\n          # Type: bool\n          sdk.schema.encode.key.enabled: "true"\n          # Whether to encode the record payload using its corresponding schema\n          # from the schema registry.\n          # Type: bool\n          sdk.schema.encode.payload.enabled: "true"\n'})})}),(0,i.jsx)(h.A,{value:"table",label:"Table",children:(0,i.jsxs)("table",{class:"no-margin-table",children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Name"}),(0,i.jsx)("th",{children:"Type"}),(0,i.jsx)("th",{children:"Default"}),(0,i.jsx)("th",{children:"Description"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"mapping"})}),(0,i.jsx)("td",{children:"string"}),(0,i.jsx)("td",{children:(0,i.jsx)(t.A,{label:"null"})}),(0,i.jsxs)("td",{children:[(0,i.jsx)(n.p,{children:'Mapping is a comma separated list of keys and values for fields and their\nnew names (keys and values are separated by colons ":").'}),(0,i.jsxs)(n.p,{children:["For example: ",(0,i.jsx)(n.code,{children:".Metadata.key:id,.Payload.After.foo:bar"}),"."]}),(0,i.jsxs)(n.p,{children:["For more information about the format, see ",(0,i.jsx)(n.a,{href:"https://conduitio.github.io/docs/using/processors/referencing-fields",children:"Referencing fields"}),"."]})]})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"sdk.schema.decode.key.enabled"})}),(0,i.jsx)("td",{children:"bool"}),(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"true"})}),(0,i.jsx)("td",{children:(0,i.jsx)(n.p,{children:"Whether to decode the record key using its corresponding schema from the schema registry."})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"sdk.schema.decode.payload.enabled"})}),(0,i.jsx)("td",{children:"bool"}),(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"true"})}),(0,i.jsx)("td",{children:(0,i.jsx)(n.p,{children:"Whether to decode the record payload using its corresponding schema from the schema registry."})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"sdk.schema.encode.key.enabled"})}),(0,i.jsx)("td",{children:"bool"}),(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"true"})}),(0,i.jsx)("td",{children:(0,i.jsx)(n.p,{children:"Whether to encode the record key using its corresponding schema from the schema registry."})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"sdk.schema.encode.payload.enabled"})}),(0,i.jsx)("td",{children:"bool"}),(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"true"})}),(0,i.jsx)("td",{children:(0,i.jsx)(n.p,{children:"Whether to encode the record payload using its corresponding schema from the schema registry."})})]})]})})]}),"\n",(0,i.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,i.jsx)(n.h3,{id:"rename-multiple-fields",children:"Rename multiple fields"}),"\n",(0,i.jsxs)(n.p,{children:["This example renames the fields in ",(0,i.jsx)(n.code,{children:".Metadata"})," and\n",(0,i.jsx)(n.code,{children:".Payload.After"})," as specified in the ",(0,i.jsx)(n.code,{children:"mapping"})," configuration parameter."]}),"\n",(0,i.jsx)(n.h4,{id:"configuration-parameters-1",children:"Configuration parameters"}),"\n",(0,i.jsxs)(c.A,{groupId:"config-params",children:[(0,i.jsx)(h.A,{value:"yaml",label:"YAML",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yaml",children:'version: 2.2\npipelines:\n  - id: example\n    status: running\n    connectors:\n      # define source and destination ...\n    processors:\n      - id: example\n        plugin: "field.rename"\n        settings:\n          mapping: ".Metadata.key1:newKey,.Payload.After.foo:newFoo"\n'})})}),(0,i.jsx)(h.A,{value:"table",label:"Table",children:(0,i.jsxs)("table",{class:"no-margin-table",children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Name"}),(0,i.jsx)("th",{children:"Value"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:"mapping"})}),(0,i.jsx)("td",{children:(0,i.jsx)(n.code,{children:".Metadata.key1:newKey,.Payload.After.foo:newFoo"})})]})]})})]}),"\n",(0,i.jsx)(n.h4,{id:"record-difference",children:"Record difference"}),"\n",(0,i.jsx)(l.A,{className:"diff-viewer",children:(0,i.jsx)(a(),{styles:{diffContainer:{overflowX:"auto",overflowY:"hidden"}},leftTitle:"Before",rightTitle:"After",oldValue:'{\n  "position": null,\n  "operation": "create",\n  "metadata": {\n    "ke
1y1": "val1"\n  },\n  "key": null,\n  "payload": {\n    "before": {\n      "bar": "baz"\n    },\n    "after": {\n      "foo": "bar"\n    }\n  }\n}',newValue:'{\n  "position": null,\n  "operation": "create",\n  "metadata": {\n    "newKey": "val1"\n  },\n  "key": null,\n  "payload": {\n    "before": {\n      "bar": "baz"\n    },\n    "after": {\n      "newFoo": "bar"\n    }\n  }\n}',hideLineNumbers:!1,showDiffOnly:!1,splitView:!0})})]})}function j(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(x,{...e})}):x(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.