New Posts, Page11

Raqsoft Blog

An Illustration of esProc’s Parallel Processing of Big Text Files

In esProc we can perform parallel processing on big text files conveniently. The following example will illustrate the method.  There is a text file, sales.txt, with ten million sales records. Its main fields include SellerID, OrderDate and Amount. Now compute each salesman’s total amount of big orders in the past...

2015-03-19 713 0 0

esProc Heterogeneous Datasources – JSON and HTTP

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 1051 0 0

esProc Heterogeneous Datasource – Hadoop

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 968 0 0

esProc Divides Letters into Segments

The RBP_VALUE field in the rbd_dtl table stores the string “all” and some letters. We want to convert values in the field to strings of segments. The desired result is A-F,H,J-K,N-O,Q-S,U-V,X-Z. Below is the original data: Rules to be followed are: If RBP_VALUE= “ALL”, then discard the value; According to the alphabet...

2015-03-17 855 0 0

esProc Simplifies SQL-style Computations – Record Splitting

Programmers often encounter complicated SQL-style computations during database application development. Record splitting, for example, is to split a record separated by a certain separator into multiple ones. For different databases, SQL has various problems like poor syntax support and the need of writing nested and m...

2015-03-13 970 0 0

esProc Codes Column Shuffling

In database table REF_VALUES, ID column acts as the primary key and ORIGINAL_VALUE is used as the original column, whose values are to be shuffled and updated to the empty SHUFFLED_VALUE column. Below is a selection from the table:  SQL approach: Databases differ in their solution to the problem. Here Oracle is u...

2015-03-12 958 0 0

esProc Codes Dynamic MERGE statement

Databases, such as MSSQL and ORACLE, support updating tables using MERGE statement. But they lack functions for performing set operations. If data structure of the target table is unknown, it is very complicated to use the stored procedure to get its data structure and then compose the dynamic SQL statement. This may n...

2015-03-11 833 0 0

esProc Performs Dynamic Cross-database MERGE Operation

The MERGE statement provided by databases like MSSQL and ORACLE is very convenient for updating tables. But it is not as convenient as it is expected to be when the source table and target table exist in different databases. In this case esProc is able to rise to the occasion and assists the operation. source and targe...

2015-03-10 899 0 0

esProc Assists BIRT to Dynamically Insert Subtable Fields into Primary Table

Database table dColThread is the primary table with the primary key tID. dColQuestion is the subtable with the foreign key tID, as shown in the following figures: dColThread dColQuestion The desired report will display data in the grid in which the primary table is presented according to ApplicationName. Each record ...

2015-03-09 985 0 0

esProc Heterogeneous Datasources – Excel

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 963 0 0

esProc Program: Loops

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 826 0 0

esProc Assists Report Development – Irregular Cross Row Calculation

During data reporting there are many unconventional statistical tasks that are difficult to be handled solely by reporting tools, like Jasper and BIRT, or SQL. One case is to specify a particular record in the original data against which we cross-calculate all other records and derive new field values like percentages ...

2015-03-04 765 0 0

esProc Helps with Computation in MongoDB – Digital Comparison

MongoDB script has limited computational ability in realizing complicated operations, so it is difficult to solve problems of this kind using it alone. In many cases, you can only perform further computations after retrieving the desired data out. And there is no less difficulty in trying to realizing this kind of set ...

2015-03-03 768 0 0

esProc Program: Branches

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 784 0 0