catap / jaql

Jaql is a query language designed for Javascript Object Notation (JSON), a data format that has become popular because of its simplicity and modeling flexibility. Jaql is primarily used to analyze large-scale semi-structured data. Core features include user extensibility and parallelism. In addition to modeling semi-structured data, JSON simplifies extensibility. Hadoop's Map-Reduce is used for parallelism.
2 stars 0 forks source link

del() should exploit field order in schema #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The del() function used to read delimited files currently takes two options
that describe how JSON records are to be produced from the input: "fields"
and "convert". The fields options describes the order of the fields in the
file, while convert describes the data types of each field. For example,
the command

read(del("file", { fields: [ "a", "b" ], convert: schema { a: long, b:
string } })

reads a file with two columns and puts the result into a record. The aboce
command is clumsy because field names have to be repeated. This issue
proposed to modify del() so that it takes just one argument named "schema":

read(del("file", { schema: schema { a: long, b: string } })

The order of the fields in the file is taken from the schema (possible due
to Issue 72). To read a file without conversion, simply use

read(del("file", { schema: schema { a, b } })).

Note that this change makes the del() function consistent with other file
descriptor functions, which also use a "schema" field.

Original issue reported on code.google.com by Rainer.G...@gmx.de on 1 Feb 2010 at 11:34

GoogleCodeExporter commented 8 years ago
Committed r481.

Original comment by Rainer.G...@gmx.de on 1 Feb 2010 at 11:57