Skip to content

Commit

Permalink
Syntax checking for new file types
Browse files Browse the repository at this point in the history
  • Loading branch information
dcamper committed Dec 5, 2023
1 parent a1ae870 commit af4671a
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions ecl/regress/filetypeplugindataset.ecl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*##############################################################################
HPCC SYSTEMS software Copyright (C) 2023 HPCC Systems®.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
############################################################################## */

NamesLayout := RECORD
STRING20 surname;
STRING10 forename;
INTEGER2 age := 25;
END;

namesTableFlat_1 := DATASET(DYNAMIC('x'), NamesLayout, TYPE(FLAT), __COMPRESSED__, __GROUPED__);
OUTPUT(namesTableFlat_1, ALL);

namesTableThor_1 := DATASET(DYNAMIC('x'), NamesLayout, TYPE(THOR));
OUTPUT(namesTableThor_1, ALL);

namesTableCSV_1 := DATASET(DYNAMIC('x'), NamesLayout, TYPE(CSV));
OUTPUT(namesTableCSV_1, ALL);

namesTableCSV_2 := DATASET(DYNAMIC('x'), NamesLayout, TYPE(CSV : HEADING(1), SEPARATOR([',', '==>']), QUOTE(['\'', '"', '$$']), TERMINATOR(['\r\n', '\r', '\n']), NOTRIM, UTF8, MAXLENGTH(10000)));
OUTPUT(namesTableCSV_2, ALL);

namesTableXML_1 := DATASET(DYNAMIC('x'), NamesLayout, TYPE(XML));
OUTPUT(namesTableXML_1, ALL);

namesTableXML_2 := DATASET(DYNAMIC('x'), NamesLayout, TYPE(XML : '/', NOROOT));
OUTPUT(namesTableXML_2, ALL);

namesTableJSON_1 := DATASET(DYNAMIC('x'), NamesLayout, TYPE(JSON));
OUTPUT(namesTableJSON_1, ALL);

namesTableJSON_2 := DATASET(DYNAMIC('x'), NamesLayout, TYPE(JSON : '/', NOROOT));
OUTPUT(namesTableJSON_2, ALL);

0 comments on commit af4671a

Please sign in to comment.