code: public static DataSource createDataSource(final byte[] yamlBytes) throws SQLException, IOException {
          YamlRootShardingConfiguration config = YamlEngine.unmarshal(yamlBytes, YamlRootShardingConfiguration.class);
          return ShardingDataSourceFactory.createDataSource(config.getDataSources(), new ShardingRuleConfigurationYamlSwapper().swap(config.getShardingRule()), config.getProps());
      }
docs: Create sharding data source.
  
  @param yamlBytes YAML bytes for rule configuration of databases and tables sharding with data sources
  @return sharding data source
  @throws SQLException SQL exception
  @throws IOException IO exception