MixDEM components - Others

Thoses components perform various operations like data verification, command performing, code generation, and so on.


DUMMY

Component type : DUMMY
components is configured to do absolutely nothing!

AttributeDescriptionDefault
id component node identification
type component type DUMMY

Example:
<Node id="Trash" type="DUMMY" />

Top

COPY

Component type : COPY.

All records from input port are copied onto all connected output components.
AttributeDescriptionDefault
id component node identification
type component type COPY
skiprows specifies how many records/rows should be skipped. 0
maxrows specifies how many records/rows should be read.

Example:
<Node id="simple copy" type="COPY"  />

Top

DATA_GENERATOR

Component type : DATA_GENERATOR.
DATA_GENERATOR, which could generate large volumes of random data in its data schema. DATA_GENERATOR can be used to easily populate databases with thousands of rows for database testing purposes.

AttributeDescriptionDefault
id component node identification
type component type DATA_GENERATOR
limit number of rows to generate 1
skiprows specifies how many records/rows should be skipped. 0
maxrows specifies how many records/rows should be read.

Fields to be generated and their definition , can be stored on <Attrib> (Node attibute).

<Attrib> Xml attributes for URL_BUILDER :
Attribute Description Default
name name of the argument
field field name to generate
type field type to generate. type can be :
  • increment : the generated field will be autoincremented by value
  • decrement : the generated field will be autodecremented by value
  • random : generate a random number.
  • constant : the generated field will be the given value for all the generated data rows.
value value, is the value to be used to increment or decrement field, or the constant value if type = "constant". 1

Example:
<Node id="data generation" type="DATA_GENERATOR" limit="3">
<Attrib name="test id" field="id" type="increment" />
<Attrib name="test random" field="random" type="random" />
<Attrib name="test decrement" field="decrement" type="decrement" value="1" />
<Attrib name="test increment" field="increment" type="increment" value="2" />
<Attrib name="test const 1" field="const 1" type="constant" value="2008" />
<Attrib name="test const 2" field="const 2" type="constant" value="Generated line" />
</Node>
This example will generate a result like this :
"id";"random";"decrement";"increment";"const 1";"const 2";
"1";"28196";"-1";"2";"2008";"Generated line";
"2";"3469";"-2";"4";"2008";"Generated line";
"3";"27458";"-3";"6";"2008";"Generated line";

Top

URL_BUILDER

Component type : URL_BUILDER.
URL_BUILDER can be used when you'd like to control how an URL is constructed or if the needed URL is long and complex.

To see how this works, and why it can be useful, lets look at an example URL:

http://www.example.com/products/details.php?id_product=123&category=456&merchand=789
URLs are built from tow main parts. The first is the base url like "http://www.example.com/products/details.php". The second part is a the list of given parameters like "?id_product=123&category=456&merchand=789".

AttributeDescriptionDefault
id component node identification
type component type URL_BUILDER
base value to be used as url base for url generation
field if no base given and if there are another component connected as input node, URL_BUILDER will use values of field for the url generation.
skiprows specifies how many records/rows should be skipped. 0
maxrows specifies how many records/rows should be read.

The second part "parameters", can be stored on <Attrib> (Node attibute).

<Attrib> Xml attributes for URL_BUILDER :
AttributeDescriptionDefault
name name of the argument
value value of name argument
field if no value given and if there are another component connected as input node, URL_BUILDER will use values of field as value for name argument.

Example:
<Node id="Build url with given base and generated parameters" type="URL_BUILDER" 
base="http://www.example.com/products/details.php" >
<Attrib name="id_product" field="id_product" />
<Attrib name="category" field="category" />
<Attrib name="merchand" value="789" />
</Node>

Top

URL_PARSER

Component type : URL_PARSER.

URL_PARSER parses a URL and returns an associative result containing any of the various components of the URL that are present.
URL_PARSER is not meant to validate the given URL, it only breaks it up into the above listed parts. Partial URLs are also accepted, URL_PARSER tries its best to parse them correctly. whose components may be :

AttributeDescriptionDefault
id component node identification
type component type URL_PARSER
url the URL to parse
field if url is not given and if there are another component connected as input node, URL_PARSER will parse values of field.
skiprows specifies how many records/rows should be skipped. 0
maxrows specifies how many records/rows should be read.

Example:
<Node id="Parse given url" type="URL_PARSER"
     url="https://username:password@example.com:8060/path?arg=value&amp;arg=value" />
This example will generate a result like this :
"scheme";"host";"port";"user";"pass";"path";"query";"fragment";
"https";"example.com";"8060";"username";"password";"/path";"arg=value&arg=value";"";

Top

URL_ENCODER

Component type : URL_ENCODER.
URL_ENCODER dealing with URL strings : encoding and decoding.

AttributeDescriptionDefault
id component node identification
type component type URL_ENCODER
function encode or decode function name. Supported functions :
  • base64_encode : Encodes url with MIME base64
  • base64_decode : Decodes url encoded with MIME base64
  • rawurlencode : Returns a url in which all non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits.
  • rawurldecode : Returns a url in which the sequences with percent (%) signs followed by two hex digits have been replaced with literal characters.
  • urlencode : Returns a url in which all non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs.
  • urldecode : Decodes any %## encoding in the given url. The decoded url is returned.
url the URL to encode or decode
field if url is not given and if there are another component connected as input node,URL_ENCODER will encode or decode values of field.
skiprows specifies how many records/rows should be skipped. 0
maxrows specifies how many records/rows should be read.

Example:
<Node id="encode url - base64_encode" type="URL_ENCODER" 
     function = "base64_encode"
          url = "http://username:password@hostname/path?arg=value#anchor" />

<Node id="encode url - base64_decode" type="URL_ENCODER" 
     function = "base64_decode"
          url = "aHR0cDovL3VzZXJuYW1lOnBhc3N3b3JkQGhvc3RuYW1lL3BhdGg/YXJnPXZhbHVlI2FuY2hvcg==" />

<Node id="encode url - urlencode" type="URL_ENCODER" 
     function = "urlencode"
          url = "http://username:password@hostname/path?arg=value#anchor" />

<Node id="encode url - urldecode" type="URL_ENCODER" 
     function = "urldecode"
          url = "http%3A%2F%2Fusername%3Apassword%40hostname%2Fpath%3Farg%3Dvalue%23anchor" />

Top