public static String getProperty(String key, String defaultValue, Properties... props) {
        String value = null;

        if (props != null) {
            for (Properties p : props) {
                value = p.getProperty(key);
                if (value != null) {
                    break;
                }
            }
        }

        if (value == null) {
            value = System.getProperty(key);
        }

        return value == null ? defaultValue : value;
    }
Get output stream for writing a file. Directories and file will be created if
they do not exist.

@param file path to the file
@return output stream
@throws IOException when failed to create directories and/or file
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseUtils.java