def sql(sql_file, topology_name):
    'Syntax: [storm sql sql-file topology-name], or [storm sql sql-file --explain] when activating explain mode\n\n    Compiles the SQL statements into a Trident topology and submits it to Storm.\n    If user activates explain mode, SQL Runner analyzes each query statement and shows query plan instead of submitting topology.\n\n    --jars and --artifacts, and --artifactRepositories, --mavenLocalRepositoryDirectory, --proxyUrl, --proxyUsername, --proxyPassword options available for jar are also applied to sql command.\n    Please refer "help jar" to see how to use --jars and --artifacts, and --artifactRepositories, --proxyUrl, --proxyUsername, --proxyPassword options.\n    You normally want to pass these options since you need to set data source to your sql which is an external storage in many cases.\n    '
    global DEP_JARS_OPTS, DEP_ARTIFACTS_OPTS, DEP_ARTIFACTS_REPOSITORIES_OPTS, DEP_MAVEN_LOCAL_REPOSITORY_DIRECTORY, DEP_PROXY_URL, DEP_PROXY_USERNAME, DEP_PROXY_PASSWORD
    local_jars = DEP_JARS_OPTS
    artifact_to_file_jars = resolve_dependencies(DEP_ARTIFACTS_OPTS, DEP_ARTIFACTS_REPOSITORIES_OPTS, DEP_MAVEN_LOCAL_REPOSITORY_DIRECTORY, DEP_PROXY_URL, DEP_PROXY_USERNAME, DEP_PROXY_PASSWORD)
    sql_runtime_jars = get_jars_full(os.path.join(STORM_TOOLS_LIB_DIR, 'sql', 'runtime'))
    local_jars.extend(sql_runtime_jars)
    extrajars = [USER_CONF_DIR, STORM_BIN_DIR]
    extrajars.extend(local_jars)
    extrajars.extend(artifact_to_file_jars.values())
    sql_core_jars = get_wildcard_dir(os.path.join(STORM_TOOLS_LIB_DIR, 'sql', 'core'))
    extrajars.extend(sql_core_jars)
    if (topology_name == '--explain'):
        args = ['--file', sql_file, '--explain']
    else:
        args = ['--file', sql_file, '--topology', topology_name]
    exec_storm_class('org.apache.storm.sql.StormSqlRunner', jvmtype='-client', extrajars=extrajars, args=args, daemon=False, jvmopts=([('-Dstorm.dependency.jars=' + ','.join(local_jars))] + [('-Dstorm.dependency.artifacts=' + json.dumps(artifact_to_file_jars))]))
Syntax: [storm sql sql-file topology-name], or [storm sql sql-file --explain] when activating explain mode

Compiles the SQL statements into a Trident topology and submits it to Storm.
If user activates explain mode, SQL Runner analyzes each query statement and shows query plan instead of submitting topology.

--jars and --artifacts, and --artifactRepositories, --mavenLocalRepositoryDirectory, --proxyUrl, --proxyUsername, --proxyPassword options available for jar are also applied to sql command.
Please refer "help jar" to see how to use --jars and --artifacts, and --artifactRepositories, --proxyUrl, --proxyUsername, --proxyPassword options.
You normally want to pass these options since you need to set data source to your sql which is an external storage in many cases.
def sql(sql_file, topology_name):
    'Syntax: [storm sql sql-file topology-name], or [storm sql sql-file --explain] when activating explain mode\n\n    Compiles the SQL statements into a Trident topology and submits it to Storm.\n    If user activates explain mode, SQL Runner analyzes each query statement and shows query plan instead of submitting topology.\n\n    --jars and --artifacts, and --artifactRepositories, --mavenLocalRepositoryDirectory, --proxyUrl, --proxyUsername, --proxyPassword options available for jar are also applied to sql command.\n    Please refer "help jar" to see how to use --jars and --artifacts, and --artifactRepositories, --proxyUrl, --proxyUsername, --proxyPassword options.\n    You normally want to pass these options since you need to set data source to your sql which is an external storage in many cases.\n    '
    global DEP_JARS_OPTS, DEP_ARTIFACTS_OPTS, DEP_ARTIFACTS_REPOSITORIES_OPTS, DEP_MAVEN_LOCAL_REPOSITORY_DIRECTORY, DEP_PROXY_URL, DEP_PROXY_USERNAME, DEP_PROXY_PASSWORD
    local_jars = DEP_JARS_OPTS
    artifact_to_file_jars = resolve_dependencies(DEP_ARTIFACTS_OPTS, DEP_ARTIFACTS_REPOSITORIES_OPTS, DEP_MAVEN_LOCAL_REPOSITORY_DIRECTORY, DEP_PROXY_URL, DEP_PROXY_USERNAME, DEP_PROXY_PASSWORD)
    sql_runtime_jars = get_jars_full(os.path.join(STORM_TOOLS_LIB_DIR, 'sql', 'runtime'))
    local_jars.extend(sql_runtime_jars)
    extrajars = [USER_CONF_DIR, STORM_BIN_DIR]
    extrajars.extend(local_jars)
    extrajars.extend(artifact_to_file_jars.values())
    sql_core_jars = get_wildcard_dir(os.path.join(STORM_TOOLS_LIB_DIR, 'sql', 'core'))
    extrajars.extend(sql_core_jars)
    if (topology_name == '--explain'):
        args = ['--file', sql_file, '--explain']
    else:
        args = ['--file', sql_file, '--topology', topology_name]
    exec_storm_class('org.apache.storm.sql.StormSqlRunner', jvmtype='-client', extrajars=extrajars, args=args, daemon=False, jvmopts=([('-Dstorm.dependency.jars=' + ','.join(local_jars))] + [('-Dstorm.dependency.artifacts=' + json.dumps(artifact_to_file_jars))]))