Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added a step that was missing.

...

  1. Click Add New Query to open the Add New Query screen.
  2. Enter Q1 as the query id in the Query ID field.
  3. In the Datasource field, select the datasource for which you are going to write a query. Select the datasource for the Google spreadsheet that you created previously.

  4. You can directly specify the details of the spreadsheet as shown below.

    Worksheet Number1
    You want the query to get the data from Sheet1 in the Google spreadsheet.
    Start reading from2  
    You enter 2 because the 1st row of the spreadsheet is the header. The data is available from row 2 onwards.
    Rows to read5
    The data in this row will be fetched by the query.
    Headers availabletrue
    Header row1  
    You enter 1 because the 1st row of the spreadsheet includes the header.

  5. Define Output Mapping:
    Now, let's specify how the data fetched from the datasource should be displayed in the output. The Google spreadsheet we are using contains several columns with customer data. We will create output mappings for the following columns: IDCustomerNumberCustomerName, and City.

    Output typeSelect XML.
    You can select XML, JSON, or RDF. We will use XML for this tutorial.
    Grouped by elementEnter Customers.
    This is the XML element that groups the query result.
    Row NameEnter Customer.
    This is the XML element that groups each individual result.
    Add New Output Mapping

    Follow the steps given below to add a new output mapping:

    1. Click Add New Output Mapping  to start creating the output mapping for the  customerNumber  column. Enter values as shown below:

      Mapping TypeElement NameDatasource TypeDatasource Column NameParameter TypeSchema Type
      elementcustomerNumbercolumncustomerNumberSCALARstring

      add the output mapping details

    2. Click Add to save the output mapping. You will now have one output mapping listed for the query.
    3. Now, add output mappings for the following:

      Mapping TypeOutput Filed NameDatasource TypeDatasource Column NameParameter TypeSchema Type
      attributecustomerNamecolumncustomerNameSCALARstring
      attributecitycolumncitySCALARstring

      You will now have the following output mappings listed for the query:

      list of existing output mappings
  6. Click Main Configuration to return to the Query screen.
  7. Click Save.
  8. Click Next to go to the Operations screen.

...