How to add a SQL Criteria to a Data Configuration?

How to add a SQL Criteria to a Data Configuration?

book

Article ID: KB0077937

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.3 and above

Description

When creating a Data Configuration under Enterprise, adding a SQL Criteria can return data based on the specified condition/criteria. This example shows how to add a SQL Criteria to an example data "adstudy", so only rows with "ADVERT"= "COKE" will return after running the data configuration.

Issue/Introduction

This article gives an example of adding a SQL criteria to a Data Configuration.

Resolution

1. Right-click under the desired folder to select "New Data Configuration".

2. Select the database connection that the data configuration will be queried from (for instance, "ExampleData" is the database connection used in this example).
User-added image

3. Click "New" under "Queries".
User-added image

4. Click "SQL Wizard" to bring up the Statistica Query dialog.
User-added image

5. Select the data table ("adstudy" in this example) by dragging the table from the left panel to the right.

6. Right click "Select All Field" to select all variables.

7. Under the "Criteria" tab, right-click to select "Add".

8. In the "Add Criteria" dialog, select "ADVERT" as the Field, select "equals" as the Operator, click "Values..." to pick "COKE" and click "Add".

User-added image

9. Verify that the specified criteria have been listed under the Criteria dialog. Note: you can click "Preview Data" to preview the data that will be returned.

10. Click the green arrow to return data to Statistica.

User-added image

11. The SQL Statement box will now auto-generate Statistica SQL scripts based on the criteria specified in the above steps.

12. Define the Access Permission for the Data Configuration.
User-added image

13. Click "Commit" to save the change.

14. Running the data configuration will return data based on the SQL scripts.