Data Virtualization User Attributes

Reader Feature Type and User Attributes

Feature types will be created based on the endpoints of the Data Virtualization API from FME Flow.

The feature types attributes are based on the parameters and request body for each endpoint. The attributes available (depending on what is contained in an endpoint) are listed below.

The reader has two methods in handling request bodies:

  • If the content type is text/* or application/json, the body will be within the attribute request.body.
  • For any other content types (such as image/jpeg), the reader will use the attribute request.body_file_path which points to the name of a separate file as the request body.
Note  FME Flow will write the request body to a separate file whose file path will be available in the value of the attribute request.body_file_path.

Attribute

Type

Usage

header.<header>

string

The value of a header parameter for a request.

The attribute name will be based on the header parameter name in the Data Virtualization API.

path.<path_parameter>

string

The value of a path parameter for a request.

For example, if the attribute is path.id, the value can be 12345. Then in the request.path attribute, if the endpoint path is /pet/{id}, then the value of that attribute will be /pet/12345. There can be multiple attributes per endpoint depending on the endpoint for example /pet/{breed}/{id}.

query.<query_parameter>

string

The value of a query parameter for a request.

The attribute name will be based on the query parameter name in the Data Virtualization API.

request.body

string

The body of the request.

Content types text/* and application/json will be contained in this attribute.

request.body.parts{}.body

string

The body of a part in a multipart request.

If a part is content type text/* and application/json, it will be contained in this attribute.

request.body.parts{}.body_file_path

string

File path to a response body contained in a file of a multipart part.

All other content types will use this method.

request.body.parts{}.content_type

string

Content type of a part in a multipart request.

request.body.parts{}.name

string

Name of a part in a multipart request body.

request.body_file_path

string

File path to a response body contained in a file.

All other content types will use this method.

request.content_type

string

content_type of the request body.

request.path

string

Contains the endpoint path with path parameters filled in.

See attribute path.<path_parameter> for more info.

Writer Feature Type and User Attributes

The writer uses a fixed schema. The user attributes are visible in Feature Type > User Attributes tab, but cannot be modified. Below are the attributes that are available in the writer.

Note  Attribute names that include braces {} are list attributes.

Attribute

Type

Usage

response.body.content

string

The content of a response body. Use this attribute for text/* or application/json content types.

response.body.content_file_path

string

File path to content of a response body contained in a separate file. Use this attribute for all other content types. Files at this path will be copied to the Data Virtualization Repository on FME Flow.

response.content_type

string

Content type of the response body. This attribute is required to write a response body.

To write a multipart body, this attribute must be set to a multipart content type. For example, multipart/mixed.

response.headers{}.name

string

Name of a response header. For example, a response header may have the value User-Agent in the attribute response.headers{0}.name.

response.headers{}.value

string

Value of a response header.

For example, if the name of the header is User-Agent, the corresponding attribute response.headers{0}.value may have the value FME/Safe Software.

response.status_code

int

HTTP Response Code. This attribute is required for the writer.