Package net.snowflake.client.api.datasource

## Class SnowflakeDataSourceFactory

- java.lang.Object
- - net.snowflake.client.api.datasource.SnowflakeDataSourceFactory

    public final class SnowflakeDataSourceFactory
    extends Object

Factory for creating `SnowflakeDataSource` instances.

This factory provides methods to create different types of Snowflake DataSource implementations. Use this factory instead of directly instantiating DataSource classes.

Example usage:

     SnowflakeDataSource ds = SnowflakeDataSourceFactory.createDataSource();
     ds.setAccount("myaccount");
     ds.setUser("myuser");
     ds.setPassword("mypassword");
     ds.setDatabase("mydb");
     ds.setSchema("myschema");
     ds.setWarehouse("mywh");

     try (Connection conn = ds.getConnection()) {
       // use connection
     }

See Also:
  `SnowflakeDataSource`

### Method Summary

All Methods Static Methods Concrete Methods
`static SnowflakeDataSource` `createDataSource()` Creates a new non-pooled Snowflake DataSource.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### createDataSource

    public static SnowflakeDataSource createDataSource()

Creates a new non-pooled Snowflake DataSource.

This DataSource creates a new physical connection for each `DataSource.getConnection()` call. For applications that require connection pooling, consider using an external connection pool manager (e.g., HikariCP, Apache DBCP) with this DataSource.

Returns:
  a new `SnowflakeDataSource` instance