In esProc, loop computation works on each member of a sequence, or each record of a table sequence and a record sequence. Now the computation can be completed with simple loop functions, instead of the loop statements.
1. Loop computation
While performing loop computation on a sequence, you can reference sequence membe...
2015-03-27 1 0
JSON is a common data-interchange format. JSON data come from external Java programs, local files or the HTTP server. esProc can easily parse the JSON strings and compute them.
The following examples will show in detail how to write an esProc script for doing this.
The first case is the one in which the JSO...
2015-03-18 1 0
esProc’s Hadoop datasource includes mainly HDFS files and Hive database. The way of accessing Hive database is similar to that of accessing other databases, so we won’t discuss it here. esProc has the built-in method of accessing HDFS files, which resembles that of accessing files from an ordinary file system. We’ll in...
2015-03-18 1 0
esProc can import the data from and write them into Excel files by making the Excel one of its various datasources. Two simple examples will show how this works.
First let’s look at the data importing. The target files are data.xlsx and data.xls (excel97-2000 format) and have the same content. sheet0 is named employee ...
2015-03-06 1 0
With esProc, the code for a loop is mainly written with for statement. The for statement will repeatedly execute the code block with for being the master cell. There are different formats of for statements, as listed below:
1. for loop
An unconditional loop is the one where the values of the master cell are, in tu...
2015-03-05 1 0
When using branch statements, we need to check one or multiple conditions, execute different code according to the results or return different results. In esProc, the if/else statement is used to realize branching. It has the following forms:
1. if x … else … in the same line
When condition x after if is true, the stat...
2015-02-28 2 0
Besides the system-provided functions, esProc supports invoking user-defined functions to handle some special operations or the encapsulation of certain computations. This article will briefly explain how to invoke user-defined functions with invoke function and how to use parameters and return the results as needed.
2015-02-27 1 0
1. esProc’s function options
Many functions in esProc can use function options with which the same function can have different work patterns. The basic format of function options is f@o(…) in which o is f function’s option. For example:
2015-02-18 2 0
Parallel computing solves a computational problem by breaking it apart into discrete subtasks and distributing them among multiple servers on which they will be implemented concurrently. Each subtask returns its own computational result to the master task for combination. Through the simultaneous use of multiple comput...
2015-02-17 3 0
Sequential computation was the simplest and most intuitive processing method for handling computational tasks. Contemporary servers and PCs, however, have gained the multi-tasking ability with multi-core CPUs. Under the circumstances, sequential computation cannot make the most use of the computational power the CPU of...
2015-02-16 1 0
To make data analysis, first you need to load the original data. The data used most frequently comes from the text files or the databases. In esProc, you can load data from the text files or the databases easily and quickly.
1. Text file data
esProc can loaddata from a text file as a table sequence. For example, the te...
2015-02-11 1 0
esProc provides a large number of functions, many of which use many parameters. In order to clearly judge the positions of these parameters and make writing and reading easier, esProc is specially equipped with multilayer separators of function parameters.
1. Separators of function parameters
Colon (:), comma (,) and s...
2015-02-10 2 0
In the article esProc External Memory Computing: Concept of Cursor, we only touched on the basic usage of the cross-cellset cursor. Here we’ll delve into more issues about it.
1. Basic usage
The cross-cellset cursor is typically used to handle big data analysis and computing, but it doesn’t impose a minimum limit on da...
2015-02-06 2 0
Since sets are commonly used in esProc, the latter provides comprehensive set operations.
1. Binary Operation on Sets
The most basic set in esProc is sequence. Let’s look at some basic binary operations between two sequences A and B.
Concatenation: Concatenate the two sequences straightforwardly. The members of B...
2015-02-05 1 0
In an esProc table sequence, a single or multiple fields can be used as a primary key. We can make query based on the primary key using some special functions, which can both simplify the code and increase computational performance effectively.
1. find and pfind
Primary keys are common used in database tables. The valu...
2015-02-04 3 0