private DBAggregationQueryConfiguration loadConfiguration() throws CannotLoadConfigurationException {
            InputStream inputStream = null;
            try {
                JAXBContext ctx = JAXBContext.newInstance(DBAggregationQueryConfiguration.class);
                Unmarshaller unmarshaller = ctx.createUnmarshaller();
                ClassLoader classLoader = getClass().getClassLoader();
                inputStream = classLoader.getResourceAsStream(DB_AGGREGATION_CONFIG_FILE);
                if (inputStream == null) {
                    throw new CannotLoadConfigurationException(DB_AGGREGATION_CONFIG_FILE
                            + " is not found in the classpath");
                }
                return (DBAggregationQueryConfiguration) unmarshaller.unmarshal(inputStream);
            } catch (JAXBException e) {
                throw new CannotLoadConfigurationException(
                        "Error in processing RDBMS query configuration: " + e.getMessage(), e);
            } finally {
                if (inputStream != null) {
                    try {
                        inputStream.close();
                    } catch (IOException e) {
                        LOG.error(String.format("Failed to close the input stream for %s", DB_AGGREGATION_CONFIG_FILE));
                    }
                }
            }
        }
Method for loading the configuration mappings.

@return an instance of {@link DBAggregationQueryConfiguration}.
@throws CannotLoadConfigurationException if the config cannot be loaded.
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/persistedaggregation/config/DBAggregationQueryUtil.java