Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

STRUCT_AS

STRUCT_AS

Generates a struct with a schema based on the specified complex data type definition and the values you pass as argument.

Syntax

STRUCT_AS (:Type.type_definition_library.type_definition, struct_value)
The following table describes the arguments for this command:
Argument
Required/Optional
Description
:Type.type_definition_library.type_definition
Required
The complex data type definition that represents the schema of the struct data.
Use the reference qualifier
:Type
to reference the type definition library that contains the complex data type definition.
struct_value
Required
Value for each element in the complex data type definition separated by comma.

Return Value

Struct.

Examples

The following expression generates a struct based on the specified complex data type definition h1_address_def with the values that you pass as arguments for the struct elements.
STRUCT_AS (:Type.type_definition_library.h1_address_def, City, State, ZIP)
The complex data type definition
h1_address_def
is defined in the type definition library as follows:
h1_address_def{ city : string state : string zip : int }
city
state
zip
RETURN VALUE
NEWYORK
NY
12345
{ city:NEWYORK state:NY zip:12345 }
REDWOOD CITY
CA
23452
{ city:REDWOOD CITY state:CA zip:23452 }

0 COMMENTS

We’d like to hear from you!