Associated Dataset

  • Last update:April 28, 2025
  • Overview

    Application Scenario

    Common scenario one: Concatenate datasets from different data sources vertically, which is equivalent to the union all operation in SQL. For example: Datasets ds1 and ds2 originate from different sources but share the same structure. By using an associated dataset, you can concatenate them into a new table.

     1.png

    Common scenario two: Query different databases or tables via different parameters. For example: With parameters, you can choose whether to use ds1 or ds2 two different datasets created under a template to retrieve data from Oracle and SQL Server, respectively. For example, Branch A uses ds1, while Branch B uses ds2.

     Gif1.gif 

    All the scenarios mentioned above can be implemented by using associated datasets, and in practical applications, the adopted methods are essentially the same.

    Function Description

    No parameter setting: You can achieve the simplest vertical concatenation function (union all).

    Parameter setting: You can use different datasets or tables via different parameters.

    Example One: No Parameter Setting

    Dataset Defining

    Create two datasets ds1 and ds2 firstly, and create queries for ds1 and ds2 by using the FRdemo data source. The following figure shows the ds1 dataset.

    ds1: SELECT DISTINCT Region,Salesperson FROM Sales_Volume

    ds2: SELECT DISTINCT Region,Product FROM Sales_Volume

     3.png

    The following figure shows the preview data of ds1 and ds2.

     4.png

    Associated Dataset Creating

    1. Click the + icon, and select Associated Dataset, as shown in the following figure.

    5.png

    2. Select ds1 and ds2, and click Preview, as shown in the following figure.

     6.png

    3. The following figure shows the previewed data.

    The same field names are merged into one column, while different field names are displayed in separate columns This is equivalent to the union all operation in SQL.

     7.png

    Example Two: Parameter Setting

    Continue to use ds1 and ds2 in Example One.

    Create Associated Dataset with Parameters

    1. Create an Associated Dataset, and click ds1 and ds2. Set a parameter in Condition Formula. You can set the value of Dataset name freely. Set dataset name in the example as dsname.

    Enter $dsname="ds1"$dsname="ds2" in Condition Formula, as shown in the following figure.

     8.png

    2. Click OK. Preview the created Associated Dataset to bring up a dialog box. You can enter different parameter values  to preview different data table, as shown in the following figure

     Gif1.gif

    Vertical Concatenation Through Associated Dataset with Parameter

    Set Condition Formula = $dsname="ds1"or($dsname="ds1",$dsname="ds2"), as shown in the following figure.

    9.png

    2. Preview the Associated Dataset.

    Enter ds1 into the dialog box. As both tables meet the given condition, the ultimate outcome is a vertical concatenation of the two tables.

    Enter ds2 into the dialog box. Only the ds2 table meets the condition, so ultimately only the ds2 table is displayed.

     Gif2.gif

    Attachment List


    Theme: Data Preparation
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy