Package net.snowflake.client.config
Class SFClientConfigParser
- java.lang.Object
-
- net.snowflake.client.config.SFClientConfigParser
-
public class SFClientConfigParser extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
SF_CLIENT_CONFIG_ENV_NAME
static String
SF_CLIENT_CONFIG_FILE_NAME
-
Constructor Summary
Constructors Constructor Description SFClientConfigParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkConfigFilePermissions(String derivedConfigFilePath)
static String
getConfigFilePathFromJDBCJarLocation()
static SFClientConfig
loadSFClientConfig(String configFilePath)
Construct SFClientConfig from client config file passed by user.
-
-
-
Field Detail
-
SF_CLIENT_CONFIG_FILE_NAME
public static final String SF_CLIENT_CONFIG_FILE_NAME
- See Also:
- Constant Field Values
-
SF_CLIENT_CONFIG_ENV_NAME
public static final String SF_CLIENT_CONFIG_ENV_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadSFClientConfig
public static SFClientConfig loadSFClientConfig(String configFilePath) throws IOException
Construct SFClientConfig from client config file passed by user. This method searches the config file in following order: 1. configFilePath param which is read from connection URL or connection property. 2. Environment variable: SF_CLIENT_CONFIG_FILE containing full path to sf_client_config file. 3. Searches for default config file name(sf_client_config.json under the driver directory from where the driver gets loaded. 4. Searches for default config file name(sf_client_config.json) under user home directory.- Parameters:
configFilePath
- SF_CLIENT_CONFIG_FILE parameter read from connection URL or connection properties- Returns:
- SFClientConfig
- Throws:
IOException
- if exception encountered when reading config file.
-
getConfigFilePathFromJDBCJarLocation
public static String getConfigFilePathFromJDBCJarLocation()
-
checkConfigFilePermissions
@SnowflakeJdbcInternalApi public static void checkConfigFilePermissions(String derivedConfigFilePath) throws IOException
- Throws:
IOException
-
-