A powerful DSL tailored for seamless CSV file manipulation. With intuitive syntax, it handles everything from data ingestion to transformation, refinement, and final output. Elevate your CSV data processing with unparalleled ease and precision.
Download the latest release for your operating system.
./csvshift --help
csvshift --source large-file.csv --destination transformed-file.csv --path script.csvshift
id,first_name,last_name,address,dob,json
1,John,Smith ,"123 Something Street, Anytown, Queensland 4209 Australia",1980-01-01,{'key': 'value'}
2,Jane,Doe,"456 Something Street, Anytown, Queensland 4209 Australia",1950-01-01,{'key': 'value'}
3,John,Doe,"789 Something Street, Anytown, Queensland 4209 Australia",1970-01-01,{'key': 'value'}
Input Columns id, first_name, last_name, address, dob
Column last_name
-> Trim
-> Replace "S" with "K"
Columns first_name, last_name
-> Replace "K" with "L"
-> Join with " " as full_name
Column address
-> Split on "," as street, city, state
Columns street, city, state
-> Trim
Column state
-> Split on " " as state, postcode, country
Column dob
-> RegexReplace "(\d{4})-(\d{2})-(\d{2})" with "$3/$2/$1"
Column dob
-> RegexExtract "(\d{2})\/(\d{2})\/(\d{4})" as day, month, year
Column json
-> Replace "'" with "\""
Output Columns id, full_name, street, city, state, postcode, country, dob, day, month, year, json
id,full_name,street,city,state,postcode,country,dob,day,month,year,json
1,John Lmith,123 Something Street,Anytown,Queensland,4209,Australia,01/01/1980,01,01,1980,"{""key"": ""value""}"
2,Jane Doe,456 Something Street,Anytown,Queensland,4209,Australia,01/01/1950,01,01,1950,"{""key"": ""value""}"
3,John Doe,789 Something Street,Anytown,Queensland,4209,Australia,01/01/1970,01,01,1970,"{""key"": ""value""}"
Input Columns ... # list of columns to be used as input (required)
Output Columns ... # list of columns to be used as output (required)
Column ... # column to be transformed
-> ... # chained transformation to be applied
Columns ... # list of columns to be transformed
-> ... # chained transformation to be applied
-> ToLower # converts string to lowercase
-> ToUpper # converts string to uppercase
-> Trim # trims whitespace from string
-> Join with {separator} as {column_name} # combines columns into a single column with specified separator
-> Split on {separator} as {column_names}
-> Replace {old} with {new} # replaces old string with new string
-> RegexReplace {pattern} with {new} # replaces regex pattern with new string
-> RegexExtract {pattern} into {column_names} # extracts regex pattern into new columns if pattern matches