- OpenSearch 2.x to 2.17
- OpenSearch Connector Feature Support
- Connect to OpenSearch
- Connect to OpenSearch Using Amazon Web Services Authentication
- OpenSearch Data Source Configuration Notes
- Distinct Counts and Percentiles in OpenSearch
- Tokenization in OpenSearch
- OpenSearch Connector IP Address Data Type Support
- OpenSearch Last Value Processing
- OpenSearch Composite Aggregation
- OpenSearch Source Document Storage Configurations
- OpenSearch Inner Hits Configuration Property
Connect to OpenSearch
When establishing a connection to an OpenSearch data store, make sure you:-
Specify the connection string in the following format:
where
<schema>is the protocol that you want to use:httporhttps(with SSL support)transportortransports(with SSL support)
- Specify your OpenSearch cluster name.
- If required, specify your OpenSearch User Name and Password.
- Select Validate to confirm your connection.
Connect to OpenSearch with a Configured Custom Certificate
If your OpenSearch cluster is configured with a custom certificate, you should configure a truststore for the Elasticsearch connector. Connect to an OpenSearch data store with a configured custom certificate- Copy a truststore to the machine on which the OpenSearch connector is running.
-
Add the following lines to file the appropriate OpenSearch
jvmfile.- For Linux:
/etc/zoomdata/edc-OpenSearch.jvm. Copy these files from the/opt/zoomdata/confdirectory if a copy is not in/etc/zoomdata/. - For Windows: ,
<install-path>/edc-OpenSearch.jvm. Copy these files from the<install-path>/confdirectory if a copy is not in<install-path>.
Replace:<path_to_truststore>with an absolute path to your truststore<truststore_password>with a password for your truststore
- For Linux:
Connect to OpenSearch Using Amazon Web Services Authentication
You can connect the Self-Service Analytics OpenSearch connectors to your OpenSearch data store using Amazon Web Services (AWS) credentials. After connecting, the Self-Service Analytics OpenSearch connectors work with AWS OpenSearch without any restrictions. Connect the OpenSearch connector to your OpenSearch data store using AWS authentication:- Specify the AWS credentials in a standard AWS-format credentials file (see Format of the credentials file) and store the file in the OpenSearch connector’s file system.
-
Edit the OpenSearch properties file (
edc-OpenSearch.properties) and locate or add theOpenSearch.aws.show-aws-connection-paramsproperty to the file. This property indicates whether AWS-specific connection parameters should be shown when a new connector is created or the connection properties of an existing connector are refreshed. Valid values aretrueorfalse. The default isfalse(users will not see new AWS connection parameters). Set the value of this property totrueand save the properties file. For more information about Self-Service Analytics properties files, see Configuration Property Files. -
Create a new OpenSearch connection or edit an existing one (see Add Data Store Connections).
The AWS connection parameters appear in the UI. Supply values for them as described in the following table.
- After you have specified all parameters necessary for the connection definition, save it. See Add Data Store Connections.
OpenSearch Composite Aggregation
Composite aggregations are implemented by OpenSearch connectors. This support optimizes aggregations of OpenSearch data, except for queries with:- histograms
- time groups with WEEK granularity
- multiple groups when group fields belong to different nested contexts.
elasticsearch.query.composite-agg.max-fetch-size in the OpenSearch configuration file (edc-elasticsearch-7.0.properties) can be used to specify the maximum number of buckets to return for each query within a composite aggregation. Valid values must be greater than zero; the default value is 10000. This property corresponds to the OpenSearch setting search.max_buckets, that also has a default value of 10000. If you elect to increase the value of the elasticsearch.query.composite-agg.max-fetch-size property, be sure to correspondingly increase the value of the OpenSearch search.max_buckets setting.
Distinct Counts and Percentiles in OpenSearch
Distinct count and percentiles metrics return approximate values in OpenSearch. The precision of the result returned by distinct count metric depends on the precision threshold setting (default value is 1000). You can change the value of the precision threshold by setting theelasticsearch.query.cardinality.precision.threshold property in the zoomdata.properties file.
See OpenSearch ‘s documentation on the following for more information:
- For OpenSearch, see the following for percentiles and distinct count.
If you need to change the default settings, add the corresponding properties (listed above) to the
zoomdata.properties file and assign the required values. For more details, see Connector Properties and Property Files.
OpenSearch Data Source Configuration Notes
When setting up an OpenSearch data source configuration, select the indices and aliases to be queried, and select the fields to be handled. You can do this in three steps:- Select indices and aliases to be queried on the Source Creation tab.
-
Select indices Manually or Automatically.
- If you want to get the data only from specific indices, select the Manually option and choose the corresponding indices from the list Select Indices.
-
The Automatically option is more flexible. It lets you set the pattern by which the indices will be selected automatically.
For this option, you can select one of the pattern types. Note that when no indices match the pattern while querying, your visuals are returned empty.
-
Native - specify the pattern for index names. Use an asterisk (*) to replace one character or a set of characters.
For example, you want to get all the indices whose name starts with log and ends with 16. In this case, specify the following pattern:
-
Time Based - set the time pattern to get the matching indices. Check the supported date and time patterns.
For example, the time pattern YYYY-MM will return all the indices, whose name will match the pattern in the following examples. Note that if the Index Name includes text with the time and date pattern, you need to enclose the text portion in brackets [ ]:
Examples:
The fields for indexes are not refreshed. If new fields are added to your data source, they are added to Self-Service Analytics only after you select the Manual Refresh button on the Cache tab of the data source configuration. If there are some changes in the existing fields (for example, if a field has been removed) they will not be applied.
-
Native - specify the pattern for index names. Use an asterisk (*) to replace one character or a set of characters.
For example, you want to get all the indices whose name starts with log and ends with 16. In this case, specify the following pattern:
Filtering by type is not supported.
OpenSearch Connector Feature Support
Connector support for specific features is shown in the following table. Key: Y - Supported; N - Not Supported; N/A - not applicable| Feature | Supported? | Notes | ||
|---|---|---|---|---|
| Admin-Defined Functions | N | |||
| Box Plots | Y | |||
| Custom SQL Queries | Y | If you need to access a BigQuery partition, explicitly include an alias for the built in partition column in your select clause, such as select *, _PARTITIONTIME as pt from projectId.datasetId.tableId. | ||
| Derived Fields (Row-Level Expressions) | Y | |||
| Distinct Counts | Y | |||
| Fast Distinct Values | Y | |||
| Group By Multiple Fields | Y | |||
| Group By Time | Y | |||
| Group By UNIX Time | N | |||
| Histogram Floating Point Values | Y | |||
| Histograms | Y | |||
| Kerberos Authentication | N | |||
| Last Value | Y | |||
| Live Mode and Playback | Y | |||
| Multivalued Fields | Y | |||
| Nested Fields | Y | |||
| Partitions | N/A | |||
| Pushdown Joins for Fusion Data Sources | N | |||
| Schemas | N/A | |||
| Text Search | Y | You can sort keyword searches by Best Match and Most Recent (when you select a preferred time field from the source). Filter your search results by selecting fields in the Filter modal. Select Clear All to clear filtered search results. | ||
| TLS | Y | |||
| User Delegation | N | |||
| Wildcard Filters | Y | |||
| Wildcard Filters, Case-Insensitive Mode | N | Case-sensitivity cannot be enforced. Consequently, neither case-sensitive or case-insensitive wildcard filters are supported. | ||
| Wildcard Filters, Case-Sensitive Mode | N | Case-sensitivity cannot be enforced. Consequently, neither case-sensitive or case-insensitive wildcard filters are supported. | ||
OpenSearch Inner Hits Configuration Property
Use the Self-Service Analytics OpenSearchelasticsearch.inner-hits.size property to specify the maximum number of hits to return per inner_hits query (used for raw data requests involving nested fields). The default value is 100.
If you specify a value that is too small, the number of values returned for a nested field in a document with a large number of sub-documents may be limited. If you specify a value that is too large, excessive memory may be consumed.
To learn more about this property, see inner hits.
OpenSearch Connector IP Address Data Type Support
The IP Address data type is supported for OpenSearch data connectors. Fields of this type are treated as ATTRIBUTEs and can be used in:- An OpenSearch text search box. When searching via the text search, Self-Service Analytics also supports the CIDR notation for IP addresses.
- The Group By selection box.
- Filters, although Self-Service Analytics does not support CIDR notation in filters for an IP address field. An exact match is required.
- Row-level expressions. In row-level expressions, Self-Service Analytics treats IP addresses as strings and expect an exact match.
OpenSearch Last Value Processing
There are situations in which the OpenSearch connector cannot compute the Last Value metric correctly.-
When the original value is available for a metric field, an error appears in either of the following situations:
- Both metric and group fields are nested and related.
- Both metric and time fields are nested and related.
The OpenSearch connector still may not always choose the maximum value among several values for the Last Value of a time field. This should happen only in the following cases:- When the metric field is nested and neither the group or time field is located in the same hierarchy (group and time fields are either at the root level or belong to another hierarchy)
- When the Last Value is an array.
-
When the original value is not available for a metric field (the result is fetched from doc values or stored fields), an error appears when the metric field is nested and the time field is not located on the same or lower level in the hierarchy.
The OpenSearch connector still may not always choose the maximum value among several values for the Last Value of a time field. This should happen only when the Last Value is an array.
OpenSearch Source Document Storage Configurations
OpenSearch data stores generally store the original JSON source documents passed when Elasticsearch performs its document indexing in the_source field in the index. However, some organizations disable the _source field to save storage and thus do not store the original JSON source documents.
Self-Service Analytics OpenSearch connectors support OpenSearch data stores with any of the following source document configurations:
-
Source documents disabled. For example:
-
Source documents enabled, but with some source exclusions. For example:
-
Source documents enabled, with no exclusions.
Known Issue Summary
The following known issues exist when the_source field is disabled or when it is enabled with exclusions:
- Raw data presentation will vary, depending on the source from which the raw field data is fetched. In particular, fused data sources may be affected where OpenSearch indices with different mappings are joined (for example, when such indices are joined by an IP field and one of them allows Self-Service Analytics to fetch the data from the original documents but another requires Self-Service Analytics to fetch the data from doc values). See Raw Data Differences .
- The last value metric may be computed incorrectly for nested fields. Last value metrics are computed incorrectly when a time field is higher in the nested hierarchy or when a time field does not belong to the same hierarchy as the metric field.
- Raw data is not available for some nested fields in multi-index OpenSearch data sources. When a nested field exists in some indices but is absent in other indices, the field’s raw data is not available. It is represented as having a NULL value in all documents when it is included in a table.
- Some nested fields are not searchable in multi-index data sources. When a nested field exists in some indices but is absent in other indices, it cannot be used in text search queries. Such fields will not be used for text searches.
Raw Data Differences
The following Self-Service Analytics functions are impacted by the source document storage configuration of your OpenSearch data stores:- The data source collection preview on the Indices tab of the data source configuration
- Tables
- Text search results
- Last value metric computations.
- If the field is stored, the stored value is fetched.
- If the field is available in the original stored document, the value in the original stored document is fetched.
- If doc values are available for the field and the field is not a text field, the doc value is fetched. For more information, see Text Field Raw Data Considerations.
| Value Fetched From | Differences from the original stored document |
|---|---|
| The stored value |
|
| The doc value |
|
Text Field Raw Data Considerations
Doc values are enabled by default for all fields, except for text fields. Consequently, by default, even if the original document is not stored or some fields are excluded from it, raw data is available for all fields, except for text fields. An alternative structure called field data can be used for text fields. However, field data contains a set of terms for a text field, not its original value. For this reason, raw data for a text field is not available if the text field is not stored in the index and cannot be fetched from the original document. For example, the following mapping specifies that original documents should not be stored and declares two fields:name of type keyword and description of type text:
description is not available in the index. To make raw data available for this field, declare it stored, as shown below:
Tokenization in OpenSearch
Keep in mind that OpenSearch, by default, tokenizes or analyzes fields that are of typetext. As a result, strings consisting of two or more words may become separate fields when connected to Self-Service Analytics (for example, city names like Las Vegas). To disable this process and ensure that a string field is not analyzed, specify its type as keyword: