Creating a Standard Data Source
A standard data source lets a model access the contents of a single data table via an existing data source Connection. The tabular values returned by a data source can be mapped to a range of KnowledgeKube content, including multiple choice questions, grids, and the Expression Engine.
Implementation:
- Switch to the Definition tab.
- Click to open the Model Data Sources window.
- Click or New to open the New Data Source dialog.
- Select the An Existing KnowledgeKube Data Source Provider Connection radio button.
- Click the New Data Source From Provider button. This will open the KnowledgeKube Data Source dialog.
- Use the first drop-down menu to choose a connection to supply the data.
- Use the second drop-down menu to choose a table from the selected database.
- Enter a meaningful name for the data source.
If you right-click the name field, you can select Use Table Name to auto-fill the name field with the name of the selected table.
- To limit the number of rows your data source will fetch, enter a value in the Maximum Rows field. If you don't want to limit your data source in this way, enter a value of 0 here.
- (Optional) To make the data source available to other models in the repository, tick the Shared check box.
- Switch to the Options panel.
- If you want to apply a filter to all values returned by this data source, tick the Apply A Filter To The Data Source check box and use the Select Filter drop-down menu to select the intended filter.
Only one filter may be applied to a data source at a time. If the filter you want to apply does not currently exist, you can save the data connection without a filter, create the filter separately and then apply the filter by editing the data source.
- If the target database was created using an application incompatible with the OPTION (RECOMPILE) parameter, untick the Enable SQL OPTION (RECOMPILE) check box. This parameter was added to SQL Server in the 2005 edition, so most modern databases will not require you to make this change.
- Click Save.
By default, new database connections retrieve every field from the associated data table. If you don't want this to happen, you can limit the number of fields returned by the data source.