Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flux commands examples #148

Merged
merged 18 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resources/examples/Fixes/add_field
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Add+a+new+field%0Aadd_field%28%22another%22%2C+%22keyword%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/append
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=append%28%22animal%22%2C+%22+is+cool%22%29%0Aappend%28%22animal_2.name%22%2C+%22+boss%22%29%0A&data=%7B%0A++%22animal%22%3A+%22bunny%22%2C%0A++%22animal_2%22%3A+%7B%0A++++%22name%22%3A+%22bird%22%2C%0A++++%22type%22%3A+%22TEST%22%0A++%7D%0A%7D%0A%0A%0A%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/call_macro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=do+put_macro%28%22testMacro%22%29%0A++++add_field%28%22%24%5BnewField%5D%22%2C%22field%22%29%0Aend%0A%0Acall_macro%28%22testMacro%22%2CnewField%3A%22createdByMacro%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/capitalize
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=capitalize%28%22key%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/copy_field
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Copy+a+new+field%0Acopy_field%28%22key%22%2C+%22anotherKey%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/do_list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-yaml%0A%7Cprint%0A%3B&transformation=%23+Iterates+over+a+list+%28or+also+a+single+element+with+the+same+name%29.%0A%23+Only+the+current+element+is+accessible+in+this+case+%28as+the+root+element%29.%0A%0Ado+list%28path%3A%22author%5B%5D%22%29%0A++move_field%28%22@type%22%2C%22type%22%29%0Aend%0A%0A&data=%7B%0A++%22author%22%3A+%5B%0A++++%7B%0A++++++%22name%22%3A+%22Test+Team%22%2C%0A++++++%22@type%22%3A+%22Organization%22%0A++++%7D%2C%0A++++%7B%0A++++++%22name%22%3A+%22Maxi+Muster%22%2C%0A++++++%22@type%22%3A+%22Person%22%0A++++%7D%2C%0A++++%7B%0A++++++%22name%22%3A+%22Sally+Sample%22%2C%0A++++++%22@type%22%3A+%22Person%22%0A++++%7D%0A++%5D%0A%7D%0A%7B%0A++%22author%22%3A+%5B%0A++++%7B%0A++++++%22@type%22%3A+%22Person%22%2C%0A++++++%22name%22%3A+%22J%C3%BCrgen+Meta%22%0A++++%7D%0A++%5D%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/do_list_with_var
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-yaml%0A%7Cprint%0A%3B&transformation=%23+Iterates+over+a+list+%28or+also+a+single+element+with+the+same+name%29.%0A%23+When+using+a+variable+as+placeholder+for+the+element+you+also+have+access+to+all+elements+of+a+record%0A%23+apart+from+the+single+item.+Hint%3A+For+now+you+have+to+use+%22+with+var+%28%22var%22%29.%0A%0Aset_array%28%22countedAuthors%22%29%0A%0Ado+list%28path%3A%22author%5B%5D%22%2C+%22var%22%3A%22%24i%22%29%0A++move_field%28%22%24i.@type%22%2C%22%24i.type%22%29%0A++add_field%28%22countedAuthors.%24append%22%2C%22one%22%29%0Aend%0A%0Acount%28%22countedAuthors%22%29%0A%0A&data=%7B%0A++%22author%22%3A+%5B%0A++++%7B%0A++++++%22name%22%3A+%22Test+Team%22%2C%0A++++++%22@type%22%3A+%22Organization%22%0A++++%7D%2C%0A++++%7B%0A++++++%22name%22%3A+%22Maxi+Muster%22%2C%0A++++++%22@type%22%3A+%22Person%22%0A++++%7D%2C%0A++++%7B%0A++++++%22name%22%3A+%22Sally+Sample%22%2C%0A++++++%22@type%22%3A+%22Person%22%0A++++%7D%0A++%5D%0A%7D%0A%7B%0A++%22author%22%3A+%5B%0A++++%7B%0A++++++%22@type%22%3A+%22Person%22%2C%0A++++++%22name%22%3A+%22J%C3%BCrgen+Meta%22%0A++++%7D%0A++%5D%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/do_once
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-yaml%0A%7Cfix%28transformationFile%29%0A%7Cencode-yaml%0A%7Cprint%0A%3B&transformation=%23+Operates+the+function+in+the+once-Bind+only+once.%0A%23+Hint+add+a+name-argument+if+you+want+have+more+than+one+once-Bind.%0A%23+Usual+usecase+is+adding+maps+and+macros+only+once+since+they+are+saved+in+the+memory.%0A%0Ado+once%28%29%0A++add_field%28%22@once%22%2C%22test%22%29%0Aend%0A&data=---%0Aid%3A+%221%22%0Atitle%3A+%22Test+1%22%0A%0A---%0Aid%3A+%222%22%0Atitle%3A+%22Test+2%22
1 change: 1 addition & 0 deletions resources/examples/Fixes/do_put_macro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=do+put_macro%28%22testMacro%22%29%0A++++add_field%28%22%24%5BnewField%5D%22%2C%22field%22%29%0Aend%0A%0Acall_macro%28%22testMacro%22%2CnewField%3A%22createdByMacro%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/downcase
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=downcase%28%22key%22%29%0A&data=%7B%0A++%22key%22+%3A+%22WORD%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/filter
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Filter+arrays+for+certain+values%0Afilter%28%22animals%5B%5D%22%2C+%22%5BZz%5Debra%22%29%0Afilter%28%22investigators%5B%5D%22%2C+%22Justus%7CBob%22%29%0Afilter%28%22tools%5B%5D%22%2C+%22.%2Aw%22%29%0A&data=%7B%0A++%22animals%22+%3A+%5B+%22dog%22%2C+%22cat%22%2C+%22zebra%22%2C+%22Zebra%22+%5D%2C%0A++%22investigators%22+%3A+%5B+%22Justus%22%2C+%22Peter%22%2C+%22Bob%22+%5D%2C%0A++%22tools%22+%3A+%5B+%22hammer%22%2C+%22saw%22%2C+%22bow%22+%5D%0A%7D%0A%0A%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/flatten
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Flatten+messy+array%0Aflatten%28%22animals%5B%5D%22%29%0A&data=%7B%0A++%22animals%22+%3A+%5B+%5B+%22ant%22%2C+%22dog%22+%5D%2C+%22cat%22%2C+%5B+%22fish%22%2C+%5B+%22zebra%22%2C+%22horse%22+%5D%2C+%22hippo%22+%5D%2C+%22giraffe%22+%5D%0A%7D%0A%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/index
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=index%28%22animal%22%2C+%22n%22%29%0A&data=%7B%0A++%22animal%22%3A+%22canary%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/isbn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=isbn%28%22test_1%22%2Cto%3A%22clean%22%29%0Aisbn%28%22test_2%22%2Cto%3A%22clean%22%2Cverify_check_digit%3A%22true%22%2Cerror_string%3A%22ung%C3%BCltig%22%29%0Aisbn%28%22test_3%22%2Cto%3A%22ISBN13%22%2Cverify_check_digit%3A%22true%22%2Cerror_string%3A%22ung%C3%BCltig%22%29%0Aisbn%28%22test_4%22%2Cto%3A%22ISBN10%22%2Cverify_check_digit%3A%22true%22%2Cerror_string%3A%22ung%C3%BCltig%22%29%0A&data=%7B%0A++%22test_1%22+%3A+%22978-3-89401-810-9%22%2C%0A++%22test_2%22+%3A+%22978-3-89401-810-9%22%2C%0A++%22test_3%22+%3A+%223442151473%22%2C%0A++%22test_4%22+%3A+%22978-3-8218-0818-5%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/join_field
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=join_field%28%22investigators%5B%5D%22%2C%22%3F%22%29%0Amove_field%28%22investigators%5B%5D%22%2C%22investigators%22%29%0A&data=%7B%0A++%22investigators%22+%3A+%5B+%22Justus%22%2C+%22Peter%22%2C+%22Bob%22+%5D%0A%7D%0A%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/move_field
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Move+or+rename+a+field%0Amove_field%28%22key%22%2C+%22movedKey%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/nothing
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-yaml%0A%7Cfix%28transformationFile%29%0A%7Cencode-yaml%0A%7Cprint%0A%3B&transformation=%23+Do+nothing%0A%0Anothing%28%29&data=---%0Aid%3A+%221%22%0Atitle%3A+%22Test+1%22%0A%0A---%0Aid%3A+%222%22%0Atitle%3A+%22Test+2%22
1 change: 1 addition & 0 deletions resources/examples/Fixes/prepend
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=prepend%28%22animal%22%2C+%22brown+%22%29%0Aprepend%28%22animal_2.name%22%2C+%22bluey+%22%29%0A&data=%7B%0A++%22animal%22%3A+%22bunny%22%2C%0A++%22animal_2%22%3A+%7B%0A++++%22name%22%3A+%22bird%22%2C%0A++++%22type%22%3A+%22TEST%22%0A++%7D%0A%7D%0A%0A%0A%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/put_filemap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7C+open-file%0A%7C+as-records%0A%7C+decode-json%0A%7C+fix%28transformationFile%29%0A%7C+encode-json%28prettyPrinting%3D%22true%22%29%0A%7C+print%3B&transformation=put_filemap%28%22https%3A//gitlab.com/oersi/oersi-etl/-/raw/master/data/maps/oefos2destatis.tsv%3Fref_type%3Dheads%22%2C%22oefos2destatis%22%2C%22sep_char%22%3A%22%5Ct%22%29%0A%0Aset_array%28%22test%5B%5D%22%29%0Ado+list%28path%3A%22about%5B%5D%22%2C%22var%22%3A%22%24i%22%29%0A++++copy_field%28%22%24i.id%22%2C%22test%5B%5D.%24append.id%22%29%0A++++lookup%28%22test%5B%5D.%24last.id%22%2C%22oefos2destatis%22%29%0Aend&data=%7B%0A++++%22about%22%3A+%5B%0A++++++++%7B%0A%09%09%09%22id%22%3A+%22https%3A//w3id.org/oerbase/vocabs/oefos2012/1%22%0A%09%09%7D%2C%0A%09%09%7B%0A%09%09%09%22id%22%3A+%22https%3A//w3id.org/oerbase/vocabs/oefos2012/102%22%0A%09%09%7D%2C%0A%09%09%7B%0A%09%09%09%22id%22%3A+%22https%3A//w3id.org/oerbase/vocabs/oefos2012/1020%22%0A%09%09%7D%0A++++%5D+%0A%7D
1 change: 1 addition & 0 deletions resources/examples/Fixes/put_map
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Define+a+map+within+the+fix+file%0Aput_map%28%22map%22%2C%0A++%22dog%22%3A%22mammal%22%2C%0A++%22cat%22%3A%22mammal%22%2C%0A++%22parrot%22%3A%22bird%22%2C%0A++%22shark%22%3A%22fish%22%2C%0A++%22dragon%22%3A%22fictional+animal%22%2C%0A++%22unicorn%22%3A%22fictional+animal%22%29%0A%0Alookup%28%22animals%5B%5D.%2A.type%22%2C+%22map%22%29%0A&data=%7B%0A++%22animals%22%3A+%5B%7B%0A++++%22name%22%3A+%22Jake%22%2C%0A++++%22type%22%3A+%22dog%22%0A++%7D%2C%7B%0A++++%22name%22%3A+%22Blacky%22%2C%0A++++%22type%22%3A+%22parrot%22%0A++%7D%5D%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/put_rdfmap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=%22http%3A//lobid.org/download/marcXml-8-records.xml%22%0A%7C+open-http%0A%7C+decode-xml%0A%7C+handle-marcxml%0A%7C+fix%28transformationFile%29%0A%7C+encode-json%28prettyPrinting%3D%22true%22%29%0A%7C+print%0A%3B&transformation=do+once%28%22maps%22%29%0A++++put_rdfmap%28%22https%3A//raw.githubusercontent.com/acka47/dnb-sg-skos/main/sg_skos_2020.ttl%22%2C+%22idLookup%22%2Ctarget%3A%22skos%3Anotation%22%29%0A++++put_rdfmap%28%22https%3A//raw.githubusercontent.com/acka47/dnb-sg-skos/main/sg_skos_2020.ttl%22%2C+%22labelLookup%22+%2C+target%3A+%22skos%3AprefLabel%22%2C+select_language%3A%22de%22%29%0Aend%0A%0Aset_array%28%22dnb_sg%5B%5D%22%29%0A%0Ado+list%28path%3A%22084%3F%3F%22%2C%22var%22%3A%22%24i%22%29%0A++++if+any_match%28%22%24i.2%22%2C+%22sdnb%7Czdbs%22%29%0A++++++++do+list%28path%3A%22%24i.a%22%2C%22var%22%3A%22%24j%22%29%0A++++++++++++copy_field%28%22%24j%22%2C%22dnb_sg%5B%5D.%24append.notation%22%29%0A++++++++++++copy_field%28%22%24j%22%2C%22dnb_sg%5B%5D.%24last.id%22%29%0A++++++++++++copy_field%28%22%24j%22%2C%22dnb_sg%5B%5D.%24last.label%22%29%0A++++++++end%0A++++end%0Aend%0A%0Alookup%28%22dnb_sg%5B%5D.%2A.id%22%2C%22idLookup%22%29%0Alookup%28%22dnb_sg%5B%5D.%2A.label%22%2C%22idLookup%22%29%0Alookup%28%22dnb_sg%5B%5D.%2A.label%22%2C%22labelLookup%22%29%0A%0Aretain%28%22dnb_sg%5B%5D%22%29
1 change: 1 addition & 0 deletions resources/examples/Fixes/put_var
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=put_var%28%22test%22%2C%22variable%22%29%0Aadd_field%28%22Show_Me_The%22%2C+%22%24%5Btest%5D%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/put_vars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=put_vars%28%0A++%22status%22%3A+%22yes%22%2C%0A++%22redist%22%3A+%22allowed%22%0A%29%0A%0A%0Aadd_field%28%22open%22%2C+%22%24%5Bstatus%5D%22%29%0Aadd_field%28%22reuse%22%2C+%22%24%5Bredist%5D%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/reject
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-yaml%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+kick+out+records+that+meet+the+conditional%0A%0Aif+exists%28%22test%22%29%0A++++reject%28%29%0Aend&data=---%0Akey%3A+word%0A%0A---%0Atest%3A+case%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/remove_field
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Remove+a+field%0Aremove_field%28%22delete%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%2C%0A++%22delete%22+%3A+%22me%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/rename
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+rename+subelements+in+object%0Arename%28%22object%22%2C+%22o%22%2C+%22__%22%29%0Arename%28%22object%22%2C+%22O%22%2C+%22%23%23%22%29%0A%0A&data=%7B%0A++%22object%22+%3A+%7B%0A++++%22okey%22+%3A+%22word%22%2C%0A++++%22key%22+%3A+%22word%22%2C%0A++++%22key_2%22+%3A+%22word_2%22%2C%0A++++%22object%22+%3A+%7B%0A++++++%22key_3%22+%3A+%22word_3%22%2C%0A++++++%22arrayOfStrings%22+%3A+%5B+%22test%22%2C+%22test_2%22%2C+%22test_3%22+%5D%0A++++%7D%2C%0A++++%22arrayOfObjects%22+%3A+%5B+%7B%0A++++++%22key_4%22+%3A+%22word_4%22%2C%0A++++++%22arrayOfStrings_2%22+%3A+%5B+%22test%22%2C+%22test_2%22%2C+%22test_3%22+%5D%0A++++%7D%2C+%7B%0A++++++%22okey_2%22+%3A+%22word_2%22%2C%0A++++++%22arrayOfStrings%22+%3A+%5B+%22test%22%2C+%22test_2%22%2C+%22test_3%22+%5D%0A++++%7D+%5D%0A++%7D%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/replace_all
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=replace_all%28%22key%22%2C+%22o%22%2C+%22__%22%29%0A&data=%7B%0A++%22key%22+%3A+%22board%22%0A%7D%0A%0A%0A%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/retain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Only+keep+certain+fields%0Aretain%28%22key%22%2C%22key3%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%2C%0A++%22key2%22+%3A+%22word2%22%2C%0A++%22key3%22+%3A+%22word3%22%2C%0A++%22key4%22+%3A+%22word4%22++%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/set_array
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Add+an+empty+array/list%0Aset_array%28%22emptyArray%5B%5D%22%29%0A%0A%23+Add+an+array/list+with+values%0Aset_array%28%22array%5B%5D%22%2C%22value1%22%2C%22value2%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/sort_field
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=sort_field%28%22animals%5B%5D%22%29%0Asort_field%28%22numbers%5B%5D%22%29%0Asort_field%28%22numbers_2%5B%5D%22%2Cnumeric%3A%22true%22%29%0Asort_field%28%22animals_2%5B%5D%22%2Creverse%3A%22true%22%29%0Asort_field%28%22numbers_3%5B%5D%22%2C+numeric%3A%22true%22%2Creverse%3A%22true%22%29%0Asort_field%28%22animals_3%5B%5D%22%2C+uniq%3A%22true%22%29%0Asort_field%28%22numbers_4%5B%5D%22%2Cnumeric%3A%22true%22%2C+uniq%3A%22true%22%29%0A&data=%7B%0A++%22animals%22+%3A+%5B+%22dog%22%2C+%22cat%22%2C+%22cat%22%2C+%22zebra%22+%5D%2C%0A++%22animals_2%22+%3A+%5B+%22dog%22%2C+%22cat%22%2C+%22cat%22%2C+%22zebra%22+%5D%2C%0A++%22animals_3%22+%3A+%5B+%22dog%22%2C+%22cat%22%2C+%22cat%22%2C+%22zebra%22+%5D%2C%0A++%22numbers%22+%3A+%5B+%227%22%2C+%222%22%2C+%227%22%2C+%221%22%2C+%2210%22+%5D%2C%0A++%22numbers_2%22+%3A+%5B+%227%22%2C+%222%22%2C+%227%22%2C+%221%22%2C+%2210%22+%5D%2C%0A++%22numbers_3%22+%3A+%5B+%227%22%2C+%222%22%2C+%227%22%2C+%221%22%2C+%2210%22+%5D%2C%0A++%22numbers_4%22+%3A+%5B+%227%22%2C+%222%22%2C+%227%22%2C+%221%22%2C+%2210%22+%5D%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/split_field
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=split_field%28%22tools%22%2C+%22--%22%29%0A&data=%7B%0A++%22tools%22+%3A+%22magic--arms--shapeShifting%22%0A%7D%0A%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/trim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Delete+trailing+and+leading+whitespaces.%0Atrim%28%22key%22%29%0A&data=%7B%0A++%22key%22+%3A+%22+word+%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/upcase
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=upcase%28%22key%22%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%0A%7D%0A
1 change: 1 addition & 0 deletions resources/examples/Fixes/vacuum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-records%0A%7Cdecode-json%0A%7Cfix%28transformationFile%29%0A%7Cencode-json%28prettyPrinting%3D%22true%22%29%0A%7Cprint%0A%3B%0A&transformation=%23+Deletes+empty+elements%0Avacuum%28%29%0A&data=%7B%0A++%22key%22+%3A+%22word%22%2C%0A++%22empty%22+%3A+%22%22%0A%7D%0A
Loading