[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThis page explains how to encode and decode rows in the Wrangler workspace of Cloud Data Fusion Studio, supporting Base32, Base64, Hex, and URL encoding/decoding schemes based on RFC-4648.\u003c/p\u003e\n"],["\u003cp\u003eWhen encoding or decoding, Wrangler generates a new column named \u003ccode\u003e<column>_encode_<type>\u003c/code\u003e, with the exception of URL encoding/decoding, and it follows rules such as resulting in a \u003ccode\u003enull\u003c/code\u003e column if the original is \u003ccode\u003enull\u003c/code\u003e, skipping rows if the column isn't found, and failing if the data type is incorrect.\u003c/p\u003e\n"],["\u003cp\u003eWrangler supports specific directives for each encoding/decoding option, including \u003ccode\u003eencode64\u003c/code\u003e, \u003ccode\u003eencode32\u003c/code\u003e, \u003ccode\u003eencode_hex\u003c/code\u003e, \u003ccode\u003eurl-encode\u003c/code\u003e, \u003ccode\u003edecode64\u003c/code\u003e, \u003ccode\u003edecode32\u003c/code\u003e, \u003ccode\u003edecode hex\u003c/code\u003e, and \u003ccode\u003eurl-decode\u003c/code\u003e, which add a transformation step to the recipe and create a new column.\u003c/p\u003e\n"]]],[],null,["# Encode and decode rows\n\nThis page explains how to encode and decode rows when you\nprepare data in the Wrangler workspace of the Cloud Data Fusion Studio.\n\nEncode a row\n------------\n\nYou can use base encoding of data to store or transfer data in environments\nthat, for legacy reasons, are restricted to US-ASCII data. You might use it in\nnew applications without those legacy restrictions because it allows the\nmanipulation of objects with text editors.\n\nYou can apply the following encoding schemes, which are based\non [RFC-4648](https://tools.ietf.org/html/rfc4648),\nto all values in a column:\n\n- Base32\n- Base64\n- Hex\n- URL\n\nWhen you encode, Wrangler generates a new column with a name in the following\nformat: `\u003ccolumn\u003e_encode_\u003ctype\u003e except for url-encode`.\n\nCloud Data Fusion uses the following rules for the column values:\n\n- If the column is `null`, the resulting column is also `null`.\n- If the chosen column isn't found in the row, the row is skipped.\n- If the column value doesn't have a string or byte data type, the transformation fails, and an error displays.\n\n### Supported encoding options\n\nWrangler supports the following encoding options:\n\nEncode base64\n: The **Base64** option adds the `encode64` directive as a transformation step\n to the recipe and creates a new column with encoded values.\n\nEncode base32\n: The **Base32** option adds the `encode32` directive as a transformation step\n to the recipe and creates a new column with encoded values.\n\nEncode hex\n: The **Hex** option adds the `encode_hex` directive as a transformation step\n to the recipe and creates a new column with encoded values.\n\nEncode URL\n: The **URL** option adds the `url-encode` directive as a transformation step\n to the recipe and encodes the current column.\n\nDecode a row\n------------\n\nYou can use base decoding of data to store or transfer data in environments\nthat, for legacy reasons, are restricted to US-ASCII data. You might use it in\nnew applications without those legacy restrictions because it allows the\nmanipulation of objects with text editors.\n\nYou can apply the following decoding schemes, which are based\non [RFC-4648](https://tools.ietf.org/html/rfc4648),\nto each value in a column:\n\n- Base32\n- Base64\n- Hex\n- URL\n\nWhen you decode, Wrangler generates a new column with a name in the following\nformat: `\u003ccolumn\u003e_encode_\u003ctype\u003e`, except for `url-decode`.\n\nCloud Data Fusion uses the following rules for the column values:\n\n- If the column is `null`, the resulting column is also `null`.\n- If the chosen column isn't found in the row, the row is skipped.\n- If the column value doesn't contain the string or byte array data types, the operation fails.\n\n### Supported decoding options\n\nWrangler supports the following encoding options:\n\nDecode base64\n: The **base64** option adds the `decode64` directive as a transformation step\n to the recipe and creates a new column with the decoded values.\n\nDecode base32\n: The **base32** option adds the `decode32` directive as a transformation step\n to the recipe and creates a new column with the decoded values.\n\nDecode hex\n: The **Hex** option adds the `decode hex` directive as a transformation step\n to the recipe and creates a new column with the decoded values.\n\nDecode URL\n: The **URL** option adds the `url-decode` directive as a transformation step\n to the recipe and decodes the current column.\n\nWhat's next\n-----------\n\n- Learn more about [Wrangler directives](/data-fusion/docs/concepts/wrangler-overview#apply_directives)."]]