Follow-up to the previous commit on this branch, both wording fixes. - The sentence this branch deleted was the page's only description of the row count when no search is active - and that is the case where the count really can exceed the rows displayed (viewdata reports count(*) for the filtered view while the grid stops at DC_MAXOBS_WEBVIEW). State it, instead of leaving the page silent on the path readers use most. - "returns the first 500" claims an ordering the search does not apply: the search is a WHERE clause with no ORDER BY, so which 500 come back is whatever the engine hands over first. Say "returns 500 of them". Checked against viewdata.sas and mp_searchdata.sas on main: the search path passes outobs=DC_MAXOBS_WEBVIEW to mp_searchdata, which caps the result dataset in the same data step that builds it, and viewdata takes its row count from that dataset - so for a search the count and the rows are capped together.
3.6 KiB
Data Controller for SAS: Viewer
The viewer screen provides a raw view of the underlying table. Choose a library, then a table, and click view to see the first 500 rows. A filter option is provided should you wish to view a different section of rows.
The following libraries will be visible:
- All libraries available on startup (session autoexec)
- Any libraries configured in the
services/public/[Data_Controller_Settings/settings]Stored Process / Viya Job - All libraries available to the logged in user in metadata (SAS 9 only)
Row and Column level security can also be applied in VIEW mode, as can additional table-level permissions (MPE_SECURITY table).
Full Table Search
A single search box can be used to make a full table search on any character or numeric value, using this macro.
The search covers every column of the table at once, so you do not need to know which column holds the value you are looking for:
- Character search (the default) is a case sensitive CONTAINS match against every character column, so
SmithfindsSmithsonandsmithfindsGoldsmith, butsmithwill not findSmithson. - Numeric search (tick the Numeric box) is an exact match against every numeric column, so
42will not find420or4210. - If a filter is applied, the search runs within the filtered rows rather than the whole table.
- The grid is capped by the
DC_MAXOBS_WEBVIEWoption (500 rows by default). - For a search, the cap applies to the row count as well: a search that matches more rows than the cap returns 500 of them, and the count shown next to the table name is the number of rows returned, not the total number of matches.
- Without a search, the count shown next to the table name is the full number of rows in the filtered view, so it can be higher than the number of rows displayed - a table of 1,200 rows reports
1,200 rowsabove a grid holding the first 500. - A search that matches nothing shows a "No data found with given conditions" panel rather than an empty grid.
Options
This button shows a range of options. If the table is editable, you will also see a EDIT option.
Download
The Download button gives several options for obtaining the current view of data:
-
CSV. This provides a comma delimited file.
-
Excel. This provides a tab delimited file.
-
SAS Datalines. This provides a SAS program with data as datalines, so that the data can be rebuilt as a SAS table.
-
SAS DDL. A download of a DDL file using SAS flavoured syntax.
-
TSQL DDL. A DDL download using SQL Server flavoured syntax.
Note - if the table is registered in Data Controller as being TXTEMPORAL (SCD2) then the download option will prefilter for the current records and removes the valid from / valid to variables. This makes the CSV suitable for DC file upload, if desired.
Note that all the above items are exported from backend. There is also a frontend context menu that can be used in the VIEW screen (right click menu) for quick export into CSV or Excel formats.
Web Query URL
This option gives you a URL that can be used to import data directly into third party tools such as Power BI or Microsoft Excel (as a "web query"). You can set up a filter, eg for a particular month, and refresh the query on demand using client tooling such as VBA.
