Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 37
An HTTP Exporter exports data held in a Stream to a HTTP Datasource

Insert excerpt
_Banners
_Banners
nameanalysis
nopaneltrue

Table of Contentsindent12pxstylenone


This page is for data modellers who want to export data via HTTP.

Overview

An HTTP exporter outputs table data via a HTTP Datasource to an external web site or service, via HTTP.

To add a new HTTP exporter to an analysis model:

  1. Go to the model's toolbar → Create group.
  2. Click
    Insert excerpt
    _http
    _http
    nopaneltrue
     to expand the menu.
  3. Drag a 
    Insert excerpt
    _http_exporter
    _http_exporter
    nopaneltrue
     onto the analysis model.

To add an existing HTTP exporter to an analysis model, in the model diagram toolbar:

  1. Go to the model toolbar → List group.
  2. Click
    Insert excerpt
    _http
    _http
    nopaneltrue
     to expand the menu.
  3. Click 
    Insert excerpt
    _http_exporter
    _http_exporter
    nopaneltrue
     to open the list of available exporters.
  4. Drag an HTTP exporter into the analysis model.


Insert excerpt
_standardhttp_settingsnewlines
_standardhttp_settingsnewlines
nopaneltrue

Panel
borderColor#7da054
titleColorwhite
titleBGColor#7da054
borderStylesolid
titleSections on this page

Insert excerpt
_property_toolbar
_property_toolbar
nopaneltrue

Insert excerpt
_property_tabs
_property_tabs
namebasic-h
nopaneltrue

Insert excerpt
_parent
_parent
nopaneltrue

Basic Settings

FieldDescription
NameName of the HTTP Exporter.
Enabled
Tick when
Insert excerpt
_check_box_tick
_check_box_tick
nopaneltrue
 when the configuration is complete and the HTTP
Exporter
exporter is ready to be used.
DatasourceThe HTTP Datasource that this exporter will send data to.

Send Message

Define details of the data that will be sent to the HTTP Datasource.

FieldDescription
HTTP Request Method
Insert excerpt
HTTP Collector
HTTP Collector
nopaneltrue
URL Expression
Insert excerpt
_url_expression
_url_expression
nopaneltrue
Statement Expression

An expression to generate the data that will be sent by the exporter to the datasource.

For example:

The statement will be encoded using the charset parameter specified by the Content-Type Header if one is present. If no Content-Type Header is set then ISO-8859-1 will be used. If the Content-Type header is set, but does not specify a charset then PhixFlow will use a default character set dependant on the content type.

Send Message

Define details of the data that will be sent to the HTTP Datasource.

FieldDescriptionURL Expression

The URL to be used, without the leading http:// prefix. The URL may contain embedded expressions within { }. If this field is blank, the url field on the httpDatasourceInstance is used directly.

For Example, this expression adds to the base url provided by the HTTP Datasource Instance:

Code Block
{_url}/sub1/sub2?param1=3
HTTP

Insert excerpt
_expression_lang
_expression_lang
nopaneltrue

Code Block
&lt?xml version ="1.0"?&gt &lt!DOCTYPE CORPORATE DASHBOARD 
"corpDash.dtd"&gt &ltresults user="%USERNAME%" 
password="%PASSWORD%"&gt &ltmonthlyTotals region={'"' + Region +
 '"'} division={'"' + Division + '"'}&gt 
&lttotalBilled&gt{'"' + TotalBilled + 
'"'}&lt\totalBilled&gt &lttotalCollected&gt{'"' + 
TotalCollected + '"'}&lt\totalCollected&gt 
&ltmonthlyTotals&gt &lt\results&gt

Note : internal variables are referenced via %USERNAME% %PASSWORD% syntax.

Expressions are enclosed in {}

Insert excerpt
_secret
_secret
nopaneltrue

See also Expressions and PhixScripts.

HTTP Headers

This section has a toolbar with standard buttonsThe grid contains a list of the HTTP headers defined for this exporter. To add a HTTP header to the list, click 

Insert excerpt
_

add

new
_

add

new
nopaneltrue
. PhixFlow opens a new HTTP Header properties. To remove a HTTP header, use the
Insert excerpt
_delete
_delete
nopaneltrue
 in the toolbar.

Response

Define how the responses from the HTTP Datasource will be handled if the the connection is either successful or fails.

FieldDescription
Result to record on the Stream

Expression to evaluate the value to put on the stream. For example:

Code Block
if(_success, _response, listToString($errors._MSGTEXT))
Check if the response indicates successful export

Expression to evaluate the response from the HTTP datasource, where a connection was made. For example:

Code Block
countElements($errors = xmlToItems(_response,"//ERROR")) == 0
Result to record on the Stream after a connection failure

Value to put on the Stream in the event that the HTTP connection attempt failed. For example:

Code Block
_error

Inputs

This section has a list of the HTTP Headers defined for this exporter.

Advanced

FieldDescriptionRecord Export TimeIf required

Connected successfully
Record Export Time

Optionally, in the drop-down list, select an attribute from the input

Stream from the drop down list. If an attribute is selected, when

table.

When the exporter writes a

message

record to the target HTTP location

(HTTP datasource)

, the selected attribute in the input record

will be

is updated with the export time.



If a record in the input

Stream

table is not exported,

this

the selected attribute

will be

is left blank.

If a record is exported

-

but the export is rolled back

-

, the attribute will be updated

, and set

by the export, then rolled back to a blank record.

Warning
Warning: if

If a record fails to export

then this attribute will still be populated, even in the case that the

, the attribute is updated and remains updated even if the export transaction in the target HTTP datasource is rolled back.


Record Export Status
If required

Optionally, in the drop-down list, select an attribute from the input

Stream from the drop down list. If an attribute is selected, when

table.

When the exporter writes a record to the target HTTP location

(HTTP datasource)

, the selected attribute in the input record

will be

is updated with the

export status (success or fail).
If a record in the input Stream is not exported, this attribute will be left blank.
The field is populated with result from "Check if the response indicates successful export" from the response tab. If a record is exported - but the export is rolled back - the attribute will be updated, and set back to a blank record.
Warning: if a record fails to export then this attribute will still be populated, even in the case that the export transaction in the target HTTP datasource is rolled back.Record ResponseIf required

value from the Status expression.

Record Response

Optionally, in the drop-down list, select an attribute from the input

Stream from the drop down list. If an attribute is selected, when

table.

When the exporter writes a record to the target HTTP location

(HTTP datasource)

, the selected attribute in the input record

will be

is updated with any export

error messages.
If a record in the input Stream is not exported, this attribute will be left blank.
The field is populated with result from "Result to record on the Stream" (and/or "Result to record on the Stream after a connection failure"). If a record is exported - but the export is rolled back - the attribute will be updated, and set back to a blank record.
Warning: if a record fails to export then this attribute will still be populated, even in the case that the export transaction in the target HTTP datasource is rolled back

messages from:

  • either Value to record on success 
  • or Value to record on failure
Status

Enter an expression to report a status. For example:

Code Block
if(_success, _response, listToString($errors._MSGTEXT))

This value is used by Record Export Status to update an attribute in the input table.

Value to record on success

Enter an expression to report a response when the HTTP connection succeeds. For example:

Code Block
countElements($errors = xmlToItems(_response,"//ERROR")) == 0

This value is used by Record Response to update an attribute in the input table.

Connection failed
Value to record on failure

Enter an expression to report a message when the HTTP connection fails. For example:

Code Block
_error

This value is used by Record Response to update an attribute in the input table.

Inputs

This section has a list of the HTTP Headers defined for this exporter.

Multipliers

FieldDescription
Input Multiplier

Enter an expression that multiplies the data.  This works in the same way as the Input Multiplier Expressions on tables and File Exporters. A complete export is carried out for each value in the list of values returned by this expression. If the expression evaluates to an empty list, then no export will be carried out. If no expression is set, a single export will be carried out.

See Expressions and PhixScripts.

Advanced


FieldDescription
DatasourceThe HTTP Datasource that this exporter will send data to.
Datasource Instance Expression

The target datasource for this exporter may list multiple HTTP Datasource instances.
Each datasource instance is identified by a unique string. This expression should evaluate to a string which allows the HTTP Exporter to determine the instance to use.
If no value is entered then the exporter will assume that there is only one instance and will use that one by default. If there is more than one instance and no expression is provided here then an error will be thrown during analysis.

Timeout (secs)

Tells the exporter to timeout each export operation after a number of seconds. If an export operation does time out, the operation will be abandoned and an error will be reported. Each record that is timed out is considered to be a single error when assessing whether the entire export should be stopped and/or rolled back - see Errors Before Rollback below.

If no value is specified, the duration of an export operation is unlimited.

Parallel Exporters

If required, you can specify that the exporter should use a number of parallel exporters. Each buffer of records read from the input pipe will be divided across the parallel exporters. The restriction applied to this is that if Group By fields are specified in the input Pipe to the exporter, all records with the same Group By key will be exported by the same exporter.

If no value is specified here then only a single exporter will be used.

Errors Before Rollback

If required, you can set the maximum number of errors found, while exporting across all exporters, before the exporter will rollback all uncommitted transactions from all exporters.
If no value is specified, the exporter will never rollback, no matter how many errors are found.
If 1 is specified, a single error will cause a rollback.

Up to this number of errors, any errors reported from the exporter will appear as warnings in the log entries. The export will not be considered failed unless the number of errors is above this threshold

.Commit SizeTells the exporter to commit records in batches of the specified sizeLog Traffic Insert excerpt_check_box_untick_check_box_unticknopaneltrue means logging will be turned off for this HTTP Exporter. This will still be logged if Log HTTP Exporter Connection Details is set in System Logging

.

Errors Before StoppingIf required, you can set the maximum number of errors found, while exporting across all exporters, before the exporter will stop attempting to export records to the datasource.
This is useful where you have set Errors Before Rollback (also configured on this tab), but wish to continue to try to export records to get view of how successful the remaining export would have been. Any records that the exporter attempts to export after the Errors Before Rollback limit has been passed will always be rolled back, even if they are successful.
If no value is entered, the exporter will stop when the Errors Before Rollback limit is reached.
Timeout (secs)

Tells the exporter to timeout each export operation after a number of seconds. If an export operation does time out, the operation will be abandoned and an error will be reported. Each record that is timed out is considered to be a single error when assessing whether the entire export should be stopped and/or rolled back - see Errors Before Rollback below.

If no value is specified, the duration of an export operation is unlimited.

IconPath name for image file.Input MultiplierThis expression works in the same way as the Input Multiplier Expressions on Streams and Database Exporters. A complete export is carried out for each value in the list of values returned by the Input Multiplier Expression. If the Input Multiplier Expression evaluates to an empty list then no export will be carried out. If no Input Multiplier Expression is set, a single export will be carried out.Datasource Instance ExpressionThe target datasource for this exporter may list multiple HTTP Datasource instances.
Each datasource instance is identified by a unique string. This expression should evaluate to a string which allows the HTTP Exporter to determine the instance to use.
If no value is entered then the exporter will assume that there is only one instance and will use that one by default. If there is more than one instance and no expression is provided here then an error will be thrown during analysis.
IconEnter the path for an image file that has been uploaded to the PhixFlow database. PhixFlow displays this icon in controls when the HTTP exporter is used.
Log Traffic

When system logging → Log Database Exporter Statements is ticked, PhixFlow always logs details of connections made by database exporters, whatever is set here; see System Logging Configuration.

Insert excerpt
_log_traffic1
_log_traffic1
nopaneltrue

Commit SizeIf you set Response options, the HTTP exporter is writing data into a PhixFlow table. Specify the number of records in a batch that the HTTP exporter writes to the database before committing changes.

Insert excerpt
_model_prop
_model_prop
nopaneltrue

Insert excerpt
_description
_description
nopaneltrue

Insert excerpt
_audit
_audit
nopaneltrue

Live Search
spaceKey@self
additionalnone
placeholderSearch all help pages
typepage

Panel
borderColor#00374F
titleColorwhite
titleBGColor#00374F
borderStylesolid
titleSections on this page

Table of Contents
maxLevel3
indent12px
stylenone

Learn More

For links to all pages in this topic, see Analysis Models for Batch Processing Data.

Insert excerpt
_

check

terms_

box_ticked

changing
_

check

terms_

box_ticked

changing
nopaneltrue

 means the details of the request and response will be logged for this HTTP Exporter. Details will not be logged if Allow Logging is not ticked in System Logging.Altering the logging setting requires the Modify System Logging Configuration privilege.