Prerequisites for Creating Export From Template
To simplify the setup of exports there are various predefined export templates available for you to select from.
It should not be necessary to update any of the details for the export however you may do so if required; for example - you may want to modify the default filter condition expression.
Create Export from Template
From the OPERA Cloud menu, select Miscellaneous, select Exports then select General (or other type of export)
Click New from Template.
On the Create New Export prompt; complete the following
Property. Select or confirm the property
Template. Click to select a template from the list. See Export Template Catalogue
Export Name. Enter or confirm a name for the export
Description. Enter a description for the export
Click Create and Continue to the Edit Export page
Export Definition panel will be populated with details from the selected template; these values should not require update
Export Name. Enter or confirm a name for the export
Description. Enter a description for the export
Pre Export Procedure. The pre-export procedure is an internal setup procedure which will be executed prior to the data export. The pre-export procedure is a pre-processor that populates and filters views, and sets variables. If a pre-export procedure is not specified, the export will look at the value(s) selected in the Parameter Form.
Post Export Procedure. The post-export procedure is a post-processor that truncates temp tables following export generation and may also reset parameters that were set for the export.
Filter Condition. Click to edit the expression for the data filter
XML Format. Click to export data in XML format
XML Root Tag. Enter root tag
Filename Formula. Click to edit expression for the export file name
File Extn Formula. Click to edit expression for the export file extension
Zip file name. Click to edit expression for the export zip file name
Export Run Configuration
End of Day. Click to generate the export during End of Day
Frequency. Select a frequency from the list
Day of Week. Select a day of the week from the list (not enabled for daily frequency)
Parameter Form. Select the parameter form to use when the export is manually generated. (not enabled when End of Day is selected)
Export Content
General Configuration
Always Export Header and Footer. Select to include header and footer lines in the export
Compress Data. Select the separate the data with a delimiter
Column Separator. Select a column (data) delimiter from the list
Add Newline. Select this check box to have each record created on a separate line in the text file
Column Configurations
Select the column options for header, detail and footer using the expression editor; see Using the Expression Editor
Click Save.
Using the Expression Editor
Expression editor provides select-able values to build an SQL expression using String, Number, Date, Boolean, and Conversion functions. You can also select from a list of SQL functions, separators, operators, and system variables such as PMS_P.BUSINESS_DATE or PMS_P.RESORT. Use the [ADD] [ADD BEFORE] and navigation controls to determine the placement of the selected function, operator, separator, string or numeric values.
Example of expressions
Type | Expression |
---|---|
Pre Export Procedure |
EXP_GENERAL_RESV_PKG.SET_EXP_START_DATE(PMS_P.BUSINESS_DATE) |
Post Export Procedure |
exp_create_data.delete_report_table |
Filter condition |
inactive_date is null and NAME_TYPE = 'D' and COUNTRY = 'US' and FIRST is not null and TOTAL_ROOM_REVENUE > '1000' |
Filter condition |
business_date=to_char(pms_p.business_date-1,'DD-MM-YY') |
Filename |
'CR'||pms_p.resort||lpad(to_char(pms_p.business_date,'DDD'),3,'0') |
Filename |
'DRS'||SUBSTR(HOTEL_CODE,1,5)||TO_CHAR(EXP_GENERAL_RESV_PKG.EXP_START_DATE(),'DDD') |
Filename |
'DCO_'||pms_p.resort||to_char(pms_p.business_date,'MMDDYY') |
Filename |
'STAT_'||pms_p.resort||'_'||to_char(sysdate,'YYYYMMDD') |
Note:
To join multiple string elements together use the ‘||’ concatenation operator in your expression.Click the pencil icon to create or edit an SQL expression.
Select a procedure, API, operator, function or other element from the list or
Enter text into String field to add text to the expression or
Enter a numeric value to the Number field to add a number to the expression
Click [ADD] to append the selection after the yellow highlighted entry.
Click [REPLACE] to replace the highlighted entry
Click [DELETE] to delete highlighted entry
Use [<] and [>] to move through the entries in the expression.
Repeat steps to construct the expression; inserting elements where required.
Click OK when complete
Parent topic: Exports