public QuarkFactoryResult create(Properties info) throws QuarkException {
  try {
    Connection connection=new Connection(info);
    connection.runFlyWay();
    DSSet dsSet=connection.getDSSet();
    DBI dbi=connection.getDbi();
    JdbcSourceDAO jdbcSourceDAO=dbi.onDemand(JdbcSourceDAO.class);
    QuboleDbSourceDAO quboleDbSourceDAO=dbi.onDemand(QuboleDbSourceDAO.class);
    CubeDAO cubeDAO=dbi.onDemand(CubeDAO.class);
    ViewDAO viewDAO=dbi.onDemand(ViewDAO.class);
    MeasureDAO measureDAO=dbi.onDemand(MeasureDAO.class);
    DimensionDAO dimensionDAO=dbi.onDemand(DimensionDAO.class);
    long dsSetId=dsSet.getId();
    long defaultDataSourceId=dsSet.getDefaultDatasourceId();
    List<JdbcSource> jdbcSources=jdbcSourceDAO.findByDSSetId(dsSetId);
    List<QuboleDbSource> quboleDbSources=quboleDbSourceDAO.findByDSSetId(dsSetId);
    List<DataSource> dataSources=new ArrayList<>();
    dataSources.addAll(jdbcSources);
    dataSources.addAll(quboleDbSources);
    ImmutableList.Builder<com.qubole.quark.planner.DataSourceSchema> schemaList=new ImmutableList.Builder<>();
    com.qubole.quark.planner.DataSourceSchema defaultSchema=null;
    for (    DataSource dataSource : dataSources) {
      com.qubole.quark.planner.DataSourceSchema dataSourceSchema=new DataSourceSchema(dataSource.getProperties(defaultDataSourceId));
      if (dataSource.getId() == defaultDataSourceId) {
        defaultSchema=dataSourceSchema;
      }
      schemaList.add(dataSourceSchema);
    }
    RelSchema relSchema=getRelSchema(viewDAO,cubeDAO,measureDAO,dimensionDAO,dsSetId);
    return new QuarkFactoryResult(schemaList.build(),relSchema,defaultSchema);
  }
 catch (  Exception se) {
    LOG.error(se.getMessage());
    throw new QuarkException(se);
  }
}

public QuarkFactoryResult create ( Properties info ) throws QuarkException { try { Connection connection = new Connection ( info ) ; connection . runFlyWay ( ) ; DSSet dsSet = connection . getDSSet ( ) ; DBI dbi = connection . getDbi ( ) ; JdbcSourceDAO jdbcSourceDAO = dbi . onDemand ( JdbcSourceDAO . class ) ; QuboleDbSourceDAO quboleDbSourceDAO = dbi . onDemand ( QuboleDbSourceDAO . class ) ; CubeDAO cubeDAO = dbi . onDemand ( CubeDAO . class ) ; ViewDAO viewDAO = dbi . onDemand ( ViewDAO . class ) ; MeasureDAO measureDAO = dbi . onDemand ( MeasureDAO . class ) ; DimensionDAO dimensionDAO = dbi . onDemand ( DimensionDAO . class ) ; long dsSetId = dsSet . getId ( ) ; long defaultDataSourceId = dsSet . getDefaultDatasourceId ( ) ; List < JdbcSource > jdbcSources = jdbcSourceDAO . findByDSSetId ( dsSetId ) ; List < QuboleDbSource > quboleDbSources = quboleDbSourceDAO . findByDSSetId ( dsSetId ) ; List < DataSource > dataSources = new ArrayList < > ( ) ; dataSources . addAll ( jdbcSources ) ; dataSources . addAll ( quboleDbSources ) ; ImmutableList . Builder < com . qubole . quark . planner . DataSourceSchema > schemaList = new ImmutableList . Builder < > ( ) ; com . qubole . quark . planner . DataSourceSchema defaultSchema = null ; for ( DataSource dataSource : dataSources ) { com . qubole . quark . planner . DataSourceSchema dataSourceSchema = new DataSourceSchema ( dataSource . getProperties ( defaultDataSourceId ) ) ; if ( dataSource . getId ( ) == defaultDataSourceId ) { defaultSchema = dataSourceSchema ; } schemaList . add ( dataSourceSchema ) ; } RelSchema relSchema = getRelSchema ( viewDAO , cubeDAO , measureDAO , dimensionDAO , dsSetId ) ; return new QuarkFactoryResult ( schemaList . build ( ) , relSchema , defaultSchema ) ; } catch ( Exception se ) { LOG . error ( se . getMessage ( ) ) ; throw new QuarkException ( se ) ; } }
creates list of quarkschema
