Skip to content

Data Transform

CSV, JSON, XML, YAML parsing, generation, and pipeline transformations.

16 modules

ModuleDescription
CSV Dosyası OkuCSV dosyasını oku ve nesne dizisine ayrıştır
CSV Dosyası YazNesne dizisini CSV dosyasına yaz
JSON AyrıştırJSON dizesini nesneye ayrıştır
JSON Dizeye ÇevirNesneyi JSON dizesine dönüştür
JSON'dan CSV'yeJSON verilerini veya dosyalarını CSV formatına dönüştür
Veri HattıBir adımda birden fazla veri dönüşümünü zincirleyin
Metin ŞablonuMetin şablonunu değişkenlerle doldur
XML OluşturNesne veya diziden XML dizesi oluştur
XML AyrıştırXML dizesini nesneye ayrıştır
YAML OluşturNesne veya diziden YAML dizesi oluştur
YAML AyrıştırYAML dizesini nesneye ayrıştır
Nesne AnahtarlarıNesneden tüm anahtarları al
Nesne BirleştirBirden fazla nesneyi tek bir nesneye birleştir
Nesne ÇıkarNesneden belirli anahtarları çıkar
Nesne SeçNesneden belirli anahtarları seç
Nesne DeğerleriNesneden tüm değerleri al

Modules

CSV Dosyası Oku

data.csv.read

CSV dosyasını oku ve nesne dizisine ayrıştır

Parameters:

NameTypeRequiredDefaultDescription
pathstringYes-Path to the file
delimiterselect (,, ;, , `, `)No,
encodingselect (utf-8, ascii, latin-1, utf-16, gbk, big5)Noutf-8Character encoding for the file
skip_headerbooleanNoFalseSkip first row (header)

Output:

FieldTypeDescription
statusstringİşlem durumu
dataarrayİşlem durumu
rowsnumberİşlem durumu
columnsarraySatır nesneleri dizisi

Example: Example

yaml
file_path: data/users.csv
delimiter: ,
encoding: utf-8

CSV Dosyası Yaz

data.csv.write

Nesne dizisini CSV dosyasına yaz

Parameters:

NameTypeRequiredDefaultDescription
pathstringYes-Path to the file
dataarrayYes-Array of data items to process
delimiterselect (,, ;, , `, `)No,
encodingselect (utf-8, ascii, latin-1, utf-16, gbk, big5)Noutf-8Character encoding for the file

Output:

FieldTypeDescription
statusstringİşlem durumu
file_pathstringİşlem durumu
rows_writtennumberİşlem durumu

Example: Example

yaml
file_path: output/results.csv
data: [{"name": "John", "score": 95}, {"name": "Jane", "score": 87}]

JSON Ayrıştır

data.json.parse

JSON dizesini nesneye ayrıştır

Parameters:

NameTypeRequiredDefaultDescription
json_stringstringYes-JSON string to parse into an object or array

Output:

FieldTypeDescription
statusstringİşlem durumu
dataobjectİşlem durumu

Example: Example

yaml
json_string: {"name": "John", "age": 30}

JSON Dizeye Çevir

data.json.stringify

Nesneyi JSON dizesine dönüştür

Parameters:

NameTypeRequiredDefaultDescription
dataobjectYes-Data object to process
prettybooleanNoFalseFormat with indentation
indentnumberNo2Indentation spaces (if pretty=true)

Output:

FieldTypeDescription
statusstringİşlem durumu
jsonstringİşlem durumu

Example: Example

yaml
data: {"name": "John", "age": 30}
pretty: true

JSON'dan CSV'ye

data.json_to_csv

JSON verilerini veya dosyalarını CSV formatına dönüştür

Parameters:

NameTypeRequiredDefaultDescription
input_dataanyYes-JSON data (array of objects) or path to JSON file
output_pathstringNo/tmp/output.csvPath where the output file will be saved
delimiterselect (,, ;, , `, `)No,
include_headerbooleanNoTrueInclude column headers in first row
flatten_nestedbooleanNoTrueFlatten nested objects using dot notation (e.g., address.city)
columnsarrayNo[]Specific columns to include (empty = all columns)

Output:

FieldTypeDescription
output_pathstringOluşturulan CSV dosyasının yolu
row_countnumberOluşturulan CSV dosyasının yolu
column_countnumberOluşturulan CSV dosyasının yolu
columnsarrayYazılan satır sayısı

Example: Convert JSON array to CSV

yaml
input_data: [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]
output_path: /tmp/users.csv

Example: Convert JSON file

yaml
input_data: /path/to/data.json
output_path: /path/to/output.csv

Veri Hattı

data.pipeline

Bir adımda birden fazla veri dönüşümünü zincirleyin

Parameters:

NameTypeRequiredDefaultDescription
inputanyYes-Dönüştürülecek giriş verisi (dizi veya nesne)
stepsarrayYes-Dönüştürülecek giriş verisi (dizi veya nesne)

Output:

FieldTypeDescription
resultanyUygulanacak dönüşüm adımlarının dizisi
original_countintegerDönüştürülmüş veri
result_countintegerDönüştürülmüş veri
steps_appliedintegerDönüşüm sonrası öğe sayısı

Example: Example

yaml
input: ${input.users}
steps: [{"filter": {"field": "active", "condition": "eq", "value": true}}, {"sort": {"field": "name", "order": "asc"}}]

Example: Example

yaml
input: ${input.records}
steps: [{"map": {"extract": "id"}}, {"limit": 10}]

Example: Example

yaml
input: ${input.data}
steps: [{"filter": {"field": "status", "condition": "eq", "value": "completed"}}, {"pick": ["id", "name", "timestamp"]}, {"sort": {"field": "timestamp", "order": "desc"}}, {"skip": 5}, {"limit": 20}]

Metin Şablonu

data.text.template

Metin şablonunu değişkenlerle doldur

Parameters:

NameTypeRequiredDefaultDescription
templatestringYes-Text template with {variable} placeholders
variablesobjectYes-Object with variable values

Output:

FieldTypeDescription
statusstringİşlem durumu
resultstringİşlem durumu

Example: Example

yaml
template: Hello {name}, you scored {score} points!
variables: {"name": "Alice", "score": 95}

XML Oluştur

data.xml.generate

Nesne veya diziden XML dizesi oluştur

Parameters:

NameTypeRequiredDefaultDescription
dataobjectYes-XML'e dönüştürülecek veri
root_tagstringNorootKök eleman etiket adı
prettybooleanNoTrueXML çıktısını güzel yazdır
encodingstringNoutf-8XML çıktısı için karakter kodlaması
declarationbooleanNoTrueXML deklarasyon başlığını ekle

Output:

FieldTypeDescription
xmlstringOluşturulan XML dizesi

Example: Example

yaml
data: {"user": {"@attributes": {"id": "1"}, "name": "John", "age": "30"}}
root_tag: users
pretty: true

XML Ayrıştır

data.xml.parse

XML dizesini nesneye ayrıştır

Parameters:

NameTypeRequiredDefaultDescription
contentstringNo-Ayrıştırılacak XML dizesi
file_pathstringNo-Ayrıştırılacak XML dosyasının yolu
preserve_attributesbooleanNoTrueAyrıştırılmış çıktıda XML özniteliklerini koru

Output:

FieldTypeDescription
resultobjectNesne olarak ayrıştırılmış XML
root_tagstringKök eleman etiket adı

Example: Example

yaml
content: <users><user id="1"><name>John</name></user></users>
preserve_attributes: true

YAML Oluştur

data.yaml.generate

Nesne veya diziden YAML dizesi oluştur

Parameters:

NameTypeRequiredDefaultDescription
dataanyYes-YAML'e dönüştürülecek veri
default_flow_stylebooleanNoFalseİç içe yapılar için akış stilini kullan
sort_keysbooleanNoFalseAnahtarları alfabetik sırayla sırala
indentnumberNo2Girinti için boşluk sayısı
allow_unicodebooleanNoTrueÇıktıda unicode karakterlere izin ver

Output:

FieldTypeDescription
yamlstringOluşturulan YAML dizesi

Example: Example

yaml
data: {"name": "John", "age": 30, "cities": ["NYC", "LA"]}
sort_keys: false
indent: 2

YAML Ayrıştır

data.yaml.parse

YAML dizesini nesneye ayrıştır

Parameters:

NameTypeRequiredDefaultDescription
contentstringNo-Ayrıştırılacak YAML dizesi
file_pathstringNo-Ayrıştırılacak YAML dosyasının yolu
multi_documentbooleanNoFalseÇok belgeli YAML'yi ayrıştır (--- ile ayrılmış)

Output:

FieldTypeDescription
resultanyNesne veya dizi olarak ayrıştırılmış YAML
typestringAyrıştırılmış sonucun türü

Example: Example

yaml
content: name: John
age: 30
cities:
  - NYC
  - LA
multi_document: false

Example: Example

yaml
content: ---
name: John
---
name: Jane
multi_document: true

Nesne Anahtarları

object.keys

Nesneden tüm anahtarları al

Parameters:

NameTypeRequiredDefaultDescription
objectobjectYes-Input object/dictionary

Output:

FieldTypeDescription
keysarrayNesne anahtarlarının listesi
countnumberNesne anahtarlarının listesi

Example: Get object keys

yaml
object: {"name": "John", "age": 30, "city": "NYC"}

Nesne Birleştir

object.merge

Birden fazla nesneyi tek bir nesneye birleştir

Parameters:

NameTypeRequiredDefaultDescription
objectsarrayYes-Array of objects to process

Output:

FieldTypeDescription
resultobjectBirleştirilmiş nesne

Example: Merge user data

yaml
objects: [{"name": "John", "age": 30}, {"city": "NYC", "country": "USA"}, {"job": "Engineer"}]

Nesne Çıkar

object.omit

Nesneden belirli anahtarları çıkar

Parameters:

NameTypeRequiredDefaultDescription
objectobjectYes-Input object/dictionary
keysarrayYes-Keys to pick or omit

Output:

FieldTypeDescription
resultobjectÇıkarılmış anahtarlar olmadan nesne

Example: Omit sensitive fields

yaml
object: {"name": "John", "age": 30, "password": "secret", "ssn": "123-45-6789"}
keys: ["password", "ssn"]

Nesne Seç

object.pick

Nesneden belirli anahtarları seç

Parameters:

NameTypeRequiredDefaultDescription
objectobjectYes-Input object/dictionary
keysarrayYes-Keys to pick or omit

Output:

FieldTypeDescription
resultobjectSadece seçilen anahtarları içeren nesne

Example: Pick user fields

yaml
object: {"name": "John", "age": 30, "email": "john@example.com", "password": "secret"}
keys: ["name", "email"]

Nesne Değerleri

object.values

Nesneden tüm değerleri al

Parameters:

NameTypeRequiredDefaultDescription
objectobjectYes-Input object/dictionary

Output:

FieldTypeDescription
valuesarrayNesne değerlerinin listesi
countnumberNesne değerlerinin listesi

Example: Get object values

yaml
object: {"name": "John", "age": 30, "city": "NYC"}

Released under the Apache 2.0 License.