Define a configured report providing export data

Configuration of the configured report is done in Alfabet Expand.

  1. In the Reports tab, right-click the Reports folder or a sub-folder thereof and select Create New Report.
  2. Click the new configured report and set the Type attribute to NativeSQL.
  3. Define the following attributes:
    • Name: Change the technical name of the configured report.
    • Category: Select the use case category you defined for the generic API integration use case.
    • Native SQL: Open the editor and define the native SQL query for the configured report:
      • The first column defined in the SELECT statement of the SQL query is ignored for technical reasons.
      • The report result is a simple table which includes both the parameters for the report call and the JSON data to be set in the body of the call. The parameters must be identical for all rows of the report.
      • If the exported data must be defined as JSON field containing an array, the complete array for the JSON field must be defined as text in the column returning the data for the JSON field. Variable values can be included between text elements:
        • '[ {"schemaNamespace": "default", "values": {"name": "'+APPLICATION.NAME+'", "objectstate": "'+ISNULL(OBJECTSTATE, '')+'"}}]' as 'objectData'

        The column must have the data type Text for the data mapping in the resource bundle definition and the Attribute definition of the ADIF export scheme.

      • The columns of the report dataset can have a name differing from the parameter names and JSON body field names. Mapping of the report data to the correct parameters and JSON fields is done in the ADIF configuration.
      • You can use Alfabet query parameters in the query to refer to the current environment, for example, to the current user or current user profile.
  4. In the toolbar, click the Save  Save_Expand button.
  5. Right-click the report node and select Set Report State to 'Active'.
  6. Right-click the report node and select Review Report. The report dataset is displayed in the Alfabet user interface and you can review whether the result is as expected.

    To change the report, you must first right-click the configured report and select Set Report State to 'Plan'. The final state of the configured report must be Active to use it for data import.

For example, projects defined in Alfabet shall be created in a GITHub® repository. The swagger file for the connection informs about two mandatory parameters to identify the repository the data shall be created in and a JSON body containing the data for the project to be created.

GenericAPI_SwaggerADIFExportExample 

The report for the Export of two projects returns two rows. One for each project. The owner and repository specification are the same for both rows.

GenericAPI_ReportExportExample