Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite wird erläutert, wie Sie Daten aus einem Feld (einer Zelle) in mehrere Zeilen unterteilen, wenn Sie Daten im Wrangler-Arbeitsbereich von Cloud Data Fusion Studio vorbereiten.
Getrennten Text
Sie können die Werte einer Zelle in neue Zeilen aufteilen, wenn sie durch die folgenden Trennzeichen getrennt sind:
Komma
Tab
Senkrechter Strich
Leerzeichen
Benutzerdefiniertes Trennzeichen
Wenn eine Zelle das ausgewählte Trennzeichen nicht enthält, wird keine neue Zeile eingefügt.
So teilen Sie Werte anhand eines Trennzeichens auf:
Klicken Sie auf dem Tab Daten auf den Namen einer Spalte und dann auf den arrow_drop_down-Pfeil zum Maximieren der Spalte.
Klicken Sie auf Aufteilen > Getrennter Text.
Wählen Sie ein Trennzeichen aus, z. B. Pipe.
Klicken Sie auf Extract.
Wrangler teilt die Felder anhand des ausgewählten Trennzeichens auf und fügt dem Rezept die Direktive split-to-row hinzu. Wenn Sie die Datenpipeline ausführen, wendet Cloud Data Fusion die Transformation auf alle Werte in der Spalte an.
In diesem Beispiel enthält ein Datensatz eine Spalte mit Stringwerten, die das Trennzeichen „Komma“ enthält:
ID
Name
1
Lee,Lucian,Luka
2
Mahan,Noam
Um den Wert in separate Zeilen aufzuteilen, löscht Wrangler die ursprüngliche Spalte und erstellt eine neue Spalte mit einer Zeile für jeden Wert. Die anderen Spaltenwerte aus der ursprünglichen Zeile werden in die neuen Zeilen kopiert:
ID
Name_1
1
Lee
1
Lucian
1
Luka
2
Mahan
2
Noam
Separate Arrays
Die flatten-Anweisung trennt Elemente in Arrays wie ["ELEMENT_1",
"ELEMENT_2", "ELEMENT_3"] in neue Zeilen. Die anderen Spaltenwerte aus dem ursprünglichen Datensatz werden in die neuen Datensätze kopiert.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eThis guide outlines the process of separating data within a single cell into multiple rows using the Wrangler workspace in Cloud Data Fusion Studio.\u003c/p\u003e\n"],["\u003cp\u003eThe "Explode > Delimited text" feature allows users to split values within a cell into new rows based on delimiters such as commas, tabs, pipes, whitespace, or a custom separator defined with a regular expression.\u003c/p\u003e\n"],["\u003cp\u003eWhen splitting delimited text, if a cell does not contain the specified delimiter, no new row will be inserted, and the original column is deleted and replaced by a new one.\u003c/p\u003e\n"],["\u003cp\u003eThe "flatten" directive can be used to separate array items into new rows, while also copying the other column values from the original record into each new record.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esplit-to-row\u003c/code\u003e directive is added to the recipe when using the delimited text feature, applying the transformation to all values in the column when the data pipeline runs.\u003c/p\u003e\n"]]],[],null,["# Explode data from fields\n\nThis page explains how to separate data from a field (a cell) into multiple\nrows when you prepare data in the Wrangler workspace of the Cloud Data Fusion\nStudio.\n\nSeparate delimited text\n-----------------------\n\nYou can separate the values from a cell into new rows if the values are\nseparated by the following delimiters:\n\n- Comma\n- Tab\n- Pipe\n- Whitespace\n- Custom separator\n\nIf a cell doesn't contain the chosen delimiter, no new row is inserted.\n\nTo split values based on a delimiter, follow these steps:\n\n1. [Go to Wrangler workspace in Cloud Data Fusion](/data-fusion/docs/concepts/wrangler-overview#navigate-to-wrangler).\n2. On the **Data** tab, go to a column name and click the arrow_drop_down expander arrow.\n3. Click **Explode \\\u003e Delimited text**.\n4. Choose a delimiter---for example **Pipe**.\n5. Click **Extract**.\n\n | **Note:** If you select Custom separator, define the delimiter with a regular expression.\n\nWrangler splits the fields based on the selected delimiter and adds the\n`split-to-row` directive to the recipe. When you run the data pipeline,\nCloud Data Fusion applies the transformation to all values in the column.\n\nIn this example, a dataset has a column of string values containing the comma\ndelimiter:\n\nTo divide the value into separate rows, Wrangler deletes the original column and\ncreates a new column with one row for each value. The other column values from\nthe original row are copied into the new rows:\n\nSeparate arrays\n---------------\n\nThe `flatten` directive separates items in arrays, such as `[\"ELEMENT_1\",\n\"ELEMENT_2\", \"ELEMENT_3\"]`, into new rows. The other column values from the\noriginal record are copied into the new records.\n\nWhat's next\n-----------\n\n- Learn more about [Wrangler directives](/data-fusion/docs/concepts/wrangler-overview#apply_directives)."]]