Query

Overview

Query is the source type for sources defined by SQL query text. In the repository seed data it is stored as QUERY with SourceTypeID = 4 and the description SQL Query.

Function

Use the Query source type when a source should be read from a custom SQL statement instead of from a physical table or view selected directly from source metadata.

When Query is selected in the Define source page, AnalyticsCreator shows the Query tab and changes the secondary action button to Test query. The entered query is stored on the source only while the source type remains Query.

Saving a Query source requires a source name, a connector, and non-empty query text. If the query text changed, AnalyticsCreator refreshes the source structure after saving and then shows the refresh log when messages or errors are available.

Access

Query source type configuration is opened through the common Define source page. The source type itself is selected in the Type field.

How to access

Navigation tree

Sources -> CONNECTOR -> Create new source, or Sources -> SOURCE -> Edit source

Toolbar

Sources -> List -> Sources

Diagram

Not direct. Edit a Query source from the Sources list or source navigation-tree node.

Visual element

Define source page, Type list, Query tab, Sources list, and source navigation-tree node.

Screen overview

The Define source page contains the following visible fields and actions when the Query source type is selected.

ID Property Description
1Source NameSource name. Saving requires a non-empty value.
2Source SchemaSource schema stored with the source. For Azure BLOB connectors the label changes to Directory and saving requires a value.
3ConnectorConnector used to execute the query. Saving requires a selected connector and prevents changing an existing source to a connector of another connector type.
4GroupOptional source group. The list is populated from existing source groups and can also accept typed text.
5TypeSelect QUERY. CSV connectors are limited to Table and do not expose Query. SAP connectors expose Table, SAP_DELTAQ, and SAP_ODP.
6Friendly nameFriendly display name stored with the source.
7Anonymization check statementOptional anonymization check statement for the source.
8DescriptionDescription stored with the source.
9DefinitionTab that contains the source-column grid. Query sources still use this grid for the detected or maintained source-column metadata.
10QueryTab shown only when the selected source type is Query.
11Query textSQL query text stored on the source. Saving a Query source requires this field to be non-empty.
12Column NameSource-column name in the Definition grid.
13OrderNrSource-column order number.
14Data TypeSource-column data type. The list is populated from the selected connector type.
15MaxLength, NumPrec, NumScaleLength, numeric precision, and numeric scale values for the source column.
16NullableControls whether the source column allows null values.
17PK Ordinal PositionPrimary-key ordinal position for the source column.
18AnonymizeAnonymization option. Values come from the COLUMNS_ANONYMIZATION_TYPES parameter, with a fallback of no and yes.
19Friendly nameFriendly display name for the source column.
20Display folderDisplay folder value for the source column.
21Referenced columnOptional reference to a source column that is the single primary-key column of another source.
22ReferencesRead-only reference information for the source column.
23DescriptionDescription for the source column.
24Test queryRuns the current query text against the selected connector without saving the source.
25ConstraintsOpens the source constraints dialog for a stored source. New unsaved sources must be saved before constraints can be edited.
26SaveSaves the source. If the query changed and is not empty, AnalyticsCreator refreshes the source structure and can show the refresh log.
27CancelReturns to the previous page. If there are unsaved changes, AnalyticsCreator asks whether to save or cancel the navigation.

List behavior

  • The Sources list can be opened globally from the Sources toolbar tab or scoped to a connector from the connector node.
  • The search filter matches source description, connector name, source schema, or source name.
  • The list grid shows Source Schema, Source Name, Connector, Type, Path, Friendly name, and Description.
  • Double-clicking a source opens it in the Define source page. Delete removes the selected source after confirmation.

Source actions

  • The Sources branch provides Refresh, DWH Wizard, List sources, Create new source, and Read source from connector.
  • A selected source provides Locate in diagram, Set diagram filter, Add to diagram filter, Edit source, Delete source, Add import, Add export, Refresh structure, Preview data, and Show reference diagram.

Related topics