Week 4

Homepage

Tasks Accomplished

I learned how to publish ECL query files from your local machine via Command Prompt and view the results on Enterprise Service Platform (localhost:8002). This is important because it will help me save time of publishing the query on ECL Watch everytime I make changes to my ECL file. So, publishing the file via Command Prompt only requires two commands.

  • The file directory where your ecl.exe is saved: cd C:\Program Files (x86)\HPCCSystems\9.0.8\clienttools\bin
  • To publish the query:

ecl.exe publish –target=roxie –server=localhost –delete-prev –no-reload –no-files –wait=7200000 -v “<C:\HPCC\ecl_testfiles\ModCitiesByStateSearch.ecl>” –name=<ModCitiesByStateSearch >–comment=”Test” -I “<C:\HPCC\ecl_testfiles>”

  • All the places that have <> indicate my current file and my directory but that will be changed according to the file I am publishing
  • Once the file is complied with any errors, the file will be published on the Roxie cluster
  • Now you can go to localhost:8002 to view the file
  • You can fill in the missing fields accordingly to get the data, for example, I entered ga to get the data from the state of Georgia and selected uniquerecords to true which will take out all the duplicated data
  • The image below shows the results

In addition, I continued to learn and experience with the ECL code language to familiarize myself with the language and be able to read and understand the ECL code in a given file. I learned about each of the functions listed below this week.

  • Record Structure
  • Transform
  • Project
  • Join

Record Structure

The formal definition “Record layouts are definitions whose expression is a RECORD structure terminated by the END keyword.” The purpose of a Record set is to create the different fields or headers for your corresponding data.

Project

The purpose of PROJECT function is to “processes through all records in the recordset performing the transform function on each record in turn”. So, PROJECT is used to execute the transform function and create a data table accordingly to the transform.

Transform

The image above shows the correct syntax for transform. TRANSFORM function defines the specific operations that must occur on a record-by-record basis. The main purpose of transform is to perform a specified action of all the data on the datasets. The example below the transform function’s purpose is to define each field from the “rec” Record structure corresponding to each section from the dataset.

Join

The image above display the correct syntax for join. Purpose of JOIN is to produce a result set based on the intersection of two or more datasets or indexes (as determined by the joincondition). The example below, shows join is combing two datasets “ds_statecity” and “addr_in” and transforming a new table with the state, city and county fields.

Blog at WordPress.com.

Design a site like this with WordPress.com
Get started