code: public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException {
          YamlRootShardingConfiguration config = YamlEngine.unmarshal(yamlFile, YamlRootShardingConfiguration.class);
          return ShardingDataSourceFactory.createDataSource(dataSourceMap, new ShardingRuleConfigurationYamlSwapper().swap(config.getShardingRule()), config.getProps());
      }
docs: Create sharding data source.
  
  @param dataSourceMap data source map
  @param yamlFile YAML file for rule configuration of databases and tables sharding without data sources
  @return sharding data source
  @throws SQLException SQL exception
  @throws IOException IO exception