Continuous transformation framework syntax
Methods, systems, and computer programs are presented for the use of a syntax framework for data transformation. A Continuous Transformation Framework (CTF) Syntax is presented that supports chainable actions that allow for continuous transformations on the original data. The CTF syntax closely resembles natural language, improves readability so code is easier to understand and read, reduces or eliminates the need for complex loops, and allows the easy traversal of arrays. The CTF framework's ability to return the original object in its transformed state enables continuous transformations and simplifies the overall process.
1 . A computer-implemented method comprising:
receiving computer program instructions for execution by a machine, the computer program instructions being defined using a predetermined syntax, the computer program instructions including at least one pipe operation, wherein a left side of the pipe operation is an input data object and a right side of the pipe operation comprises a function to be applied to the input data object, wherein the execution of the pipe operation in the predetermined syntax includes passing the input data object to the function and the pipe operation returning an output equal to a transformation of the input data object performed by the function, wherein the predetermined syntax provides a character selector for inclusion on the right side of the pipe operation to select a field in the input data object that is passed to the function to transform a value of the selected field in the input data object, wherein the character selector enables identifying the field in the input data object without using a name of the input data object;
executing, by the machine, the computer program instructions; and
causing presentation on a computer display of a result from executing the computer program instructions.
2 . The method as recited in claim 1 , wherein the pipe operation does not produce the output that is unrelated to the input data object, wherein a structure of the output is equal to the structure of the input data object or equal to a transformation in the pipe operation of the structure of the input data object.
3 . The method as recited in claim 2 , where the output is equal to one of the input data object, the input data object after one or more values in the input data object are modified, or a selection of all or part of the input data object.
4 . The method as recited in claim 1 , wherein the predetermined syntax comprises a special symbol sequence to reference fields within the input data object, the special symbol sequence enabling field selection without specifying a name of a selected field of the input data object.
5 . The method as recited in claim 1 , wherein the predetermined syntax is configured to enable a chain of several pipe operations, where each function, after a first function of the chain, in the several pipe operations, receives the input data object after the input data object is transformed by a previous function in the chain.
6 . The method as recited in claim 1 , wherein the predetermined syntax comprises enabling selection of multiple fields of the input data object by separating the multiple fields with a comma.
7 . The method as recited in claim 1 , wherein the pipe operation is a select and transform function that selects a field of the input data object and assigns a new value to the selected field of the input data object.
8 . The method as recited in claim 1 , wherein the pipe operation is a nested conditional function to select one or more fields from the input data object based on a condition.
9 . The method as recited in claim 1 , wherein the pipe operation is a transformation of the input data object to update a field of the input data object with a new value.
10 . The method as recited in claim 1 , further comprising:
providing a user interface (UI) to enter the computer program instructions.
11 . A system comprising:
a memory comprising instructions; and
one or more computer processors, wherein the instructions, when executed by the one or more computer processors, cause the system to perform operations comprising:
receiving computer program instructions for execution by a machine, the computer program instructions being defined using a predetermined syntax, the computer program instructions including at least one pipe operation, wherein a left side of the pipe operation is an input data object and a right side of the pipe operation comprises a function to be applied to the input data object, wherein the execution of the pipe operation in the predetermined syntax includes passing the input data object to the function and the pipe operation returning an output equal to a transformation of the input data object performed by the function, wherein the predetermined syntax provides a character selector for inclusion on the right side of the pipe operation to select a field in the input data object that is passed to the function to transform a value of the selected field in the input data object, wherein the character selector enables identifying the field in the input data object without using a name of the input data object;
executing, by the machine, the computer program instructions; and
causing presentation on a computer display of a result from executing the computer program instructions.
12 . The system as recited in claim 11 , wherein the pipe operation does not produce the output that is unrelated to the input data object, wherein a structure of the output is equal to the structure of the input data object or equal to a transformation in the pipe operation of the structure of the input data object.
13 . The system as recited in claim 11 , wherein the predetermined syntax comprises a special symbol sequence to reference fields within the input data object, the special symbol sequence enabling field selection without specifying a name of a selected field of the input data object.
14 . The system as recited in claim 11 , wherein the predetermined syntax is configured to enable a chain of several pipe operations, where each function, after a first function of the chain, in the several pipe operations, receives the input data object after the input data object is transformed by a previous function in the chain.
15 . The system as recited in claim 11 , wherein the predetermined syntax comprises enabling selection of multiple fields of the input data object by separating the multiple fields with a comma.
16 . A non-transitory machine-readable storage medium including instructions that, when executed by a machine, cause the machine to perform operations comprising:
receiving computer program instructions for execution by a machine, the computer program instructions being defined using a predetermined syntax, the computer program instructions including at least one pipe operation, wherein a left side of the pipe operation is an input data object and a right side of the pipe operation comprises a function to be applied to the input data object, wherein the execution of the pipe operation in the predetermined syntax includes passing the input data object to the function and the pipe operation returning an output equal to a transformation of the input data object performed by the function, wherein the predetermined syntax provides a character selector for inclusion on the right side of the pipe operation to select a field in the input data object that is passed to the function to transform a value of the selected field in the input data object, wherein the character selector enables identifying the field in the input data object without using a name of the input data object;
executing, by the machine, the computer program instructions; and
causing presentation on a computer display of a result from executing the computer program instructions.
17 . The non-transitory machine-readable storage medium as recited in claim 16 , wherein the pipe operation does not produce the output that is unrelated to the input data object, wherein a structure of the output is equal to the structure of the input data object or equal to a transformation in the pipe operation of the structure of the input data object.
18 . The non-transitory machine-readable storage medium as recited in claim 16 , wherein the predetermined syntax comprises a special symbol sequence to reference fields within the input data object, the special symbol sequence enabling field selection without specifying a name of a selected field of the input data object.
19 . The non-transitory machine-readable storage medium as recited in claim 16 , wherein the predetermined syntax is configured to enable a chain of several pipe operations, where each function, after a first function of the chain, in the several pipe operations, receives the input data object after the input data object is transformed by a previous function in the chain.
20 . The non-transitory machine-readable storage medium as recited in claim 16 , wherein the predetermined syntax comprises enabling selection of multiple fields of the input data object by separating the multiple fields with a comma.