delete_cluster, get_cluster, list_clusters, list_zones, list_node_types, spark_versions from databricks_cli.utils import eat_exceptions, CONTEXT_SETTINGS, pretty_format, json_cli_base, \ truncate_string from databricks_cli.configure.config import require_config from databricks_cli.version import print_version_callback, version @click.command(context_settings=CONTEXT_SETTINGS) @click.option( '--json-file', default=None, type=click.Path(), help='File containing JSON request to POST to /api/2.0/clusters/create.') @click.option('--json', default=None, type=JsonClickType(), help=JsonClickType.help('/api/2.0/clusters/create')) @require_config @eat_exceptions def create_cli(json_file, json): """ Creates a Databricks cluster. The specification for the request json can be found at https://docs.databricks.com/api/latest/clusters.html#create """ json_cli_base(json_file, json, create_cluster) @click.command( context_settings=CONTEXT_SETTINGS,
from databricks_cli.jobs.api import JobsApi from databricks_cli.utils import eat_exceptions, CONTEXT_SETTINGS, pretty_format, json_cli_base, \ truncate_string from databricks_cli.configure.config import provide_api_client, profile_option, debug_option from databricks_cli.version import print_version_callback, version @click.command(context_settings=CONTEXT_SETTINGS) @click.option( '--json-file', default=None, type=click.Path(), help='File containing JSON request to POST to /api/2.0/jobs/create.') @click.option('--json', default=None, type=JsonClickType(), help=JsonClickType.help('/api/2.0/jobs/create')) @debug_option @profile_option @eat_exceptions @provide_api_client def create_cli(api_client, json_file, json): """ Creates a job. The specification for the json option can be found https://docs.databricks.com/api/latest/jobs.html#create """ json_cli_base(json_file, json, lambda json: JobsApi(api_client).create_job(json))
import click from tabulate import tabulate from databricks_cli.click_types import OutputClickType, JsonClickType, InstancePoolIdClickType from databricks_cli.instance_pools.api import InstancePoolsApi from databricks_cli.utils import eat_exceptions, CONTEXT_SETTINGS, pretty_format, json_cli_base, \ truncate_string from databricks_cli.configure.config import provide_api_client, profile_option, debug_option from databricks_cli.version import print_version_callback, version @click.command(context_settings=CONTEXT_SETTINGS) @click.option('--json-file', default=None, type=click.Path(), help='File containing JSON request to POST to /api/2.0/instance-pools/create.') @click.option('--json', default=None, type=JsonClickType(), help=JsonClickType.help('/api/2.0/instance-pools/create')) @debug_option @profile_option @eat_exceptions @provide_api_client def create_cli(api_client, json_file, json): """ Creates a Databricks instance pool. The specification for the request json can be found at https://docs.databricks.com/api/latest/instance-pools.html#create """ json_cli_base(json_file, json, lambda json: InstancePoolsApi(api_client).create_instance_pool(json))
from databricks_cli.utils import eat_exceptions, CONTEXT_SETTINGS, pretty_format, json_cli_base, \ truncate_string from databricks_cli.configure.config import provide_api_client, profile_option, debug_option from databricks_cli.runs.api import RunsApi from databricks_cli.version import print_version_callback, version @click.command(context_settings=CONTEXT_SETTINGS) @click.option( '--json-file', default=None, type=click.Path(), help='File containing JSON request to POST to /api/2.0/jobs/runs/submit.') @click.option('--json', default=None, type=JsonClickType(), help=JsonClickType.help('/api/2.0/jobs/runs/submit')) @debug_option @profile_option @eat_exceptions @provide_api_client def submit_cli(api_client, json_file, json): """ Submits a one-time run. The specification for the request json can be found https://docs.databricks.com/api/latest/jobs.html#runs-submit """ json_cli_base(json_file, json, lambda json: RunsApi(api_client).submit_run(json))
from tabulate import tabulate from databricks_cli.click_types import OutputClickType, JsonClickType, RunIdClickType from databricks_cli.jobs.cli import check_version from databricks_cli.utils import eat_exceptions, CONTEXT_SETTINGS, pretty_format, json_cli_base, \ truncate_string from databricks_cli.configure.config import provide_api_client, profile_option, debug_option, \ api_version_option from databricks_cli.runs.api import RunsApi from databricks_cli.version import print_version_callback, version as cli_version @click.command(context_settings=CONTEXT_SETTINGS) @click.option('--json-file', default=None, type=click.Path(), help='File containing JSON request to POST to /api/2.*/jobs/runs/submit.') @click.option('--json', default=None, type=JsonClickType(), help=JsonClickType.help('/api/2.*/jobs/runs/submit')) @api_version_option @debug_option @profile_option @eat_exceptions @provide_api_client def submit_cli(api_client, json_file, json, version): """ Submits a one-time run. The specification for the request json can be found https://docs.databricks.com/api/latest/jobs.html#runs-submit """ check_version(api_client, version) json_cli_base(json_file, json, lambda json: RunsApi(
import click from tabulate import tabulate from databricks_cli.click_types import OutputClickType, JsonClickType, ClusterIdClickType from databricks_cli.clusters.api import ClusterApi from databricks_cli.utils import eat_exceptions, CONTEXT_SETTINGS, pretty_format, json_cli_base, \ truncate_string from databricks_cli.configure.config import provide_api_client, profile_option from databricks_cli.version import print_version_callback, version @click.command(context_settings=CONTEXT_SETTINGS) @click.option('--json-file', default=None, type=click.Path(), help='File containing JSON request to POST to /api/2.0/clusters/create.') @click.option('--json', default=None, type=JsonClickType(), help=JsonClickType.help('/api/2.0/clusters/create')) @profile_option @eat_exceptions @provide_api_client def create_cli(api_client, json_file, json): """ Creates a Databricks cluster. The specification for the request json can be found at https://docs.databricks.com/api/latest/clusters.html#create """ json_cli_base(json_file, json, lambda json: ClusterApi(api_client).create_cluster(json)) @click.command(context_settings=CONTEXT_SETTINGS,
from databricks_cli.utils import eat_exceptions, CONTEXT_SETTINGS, pretty_format, json_cli_base, \ truncate_string from databricks_cli.configure.config import provide_api_client, profile_option, debug_option from databricks_cli.version import print_version_callback, version @click.command(context_settings=CONTEXT_SETTINGS) @click.option( '--json-file', default=None, type=click.Path(), help= 'File containing JSON request to POST to /api/2.0/instance-pools/create.') @click.option('--json', default=None, type=JsonClickType(), help=JsonClickType.help('/api/2.0/instance-pools/create')) @debug_option @profile_option @eat_exceptions @provide_api_client def create_cli(api_client, json_file, json): """ Creates a Databricks instance pool. The specification for the request json can be found at https://docs.databricks.com/api/latest/instance-pools.html#create """ json_cli_base( json_file, json, lambda json: InstancePoolsApi(api_client).create_instance_pool(json))
truncate_string from databricks_cli.configure.config import provide_api_client, profile_option, debug_option from databricks_cli.version import print_version_callback, version @click.command(context_settings=CONTEXT_SETTINGS) @click.option( '--json-file', default=None, type=click.Path(), help= 'File containing JSON request to POST to /api/2.0/policies/clusters/create.' ) @click.option('--json', default=None, type=JsonClickType(), help=JsonClickType.help('/api/2.0/policies/clusters/create')) @debug_option @profile_option @eat_exceptions @provide_api_client def create_cli(api_client, json_file, json): """ Creates a Databricks cluster Policy. The specification for the request json can be found at https://docs.databricks.com/dev-tools/api/latest/policies.html#create """ json_cli_base( json_file, json, lambda json: ClusterPolicyApi(api_client).create_cluster_policy(json))
from databricks_cli.click_types import OutputClickType, JsonClickType, JobIdClickType from databricks_cli.jobs.api import JobsApi from databricks_cli.utils import eat_exceptions, CONTEXT_SETTINGS, pretty_format, json_cli_base, \ truncate_string from databricks_cli.configure.config import provide_api_client, profile_option, \ get_profile_from_context, debug_option, get_config, api_version_option from databricks_cli.configure.provider import DatabricksConfig, update_and_persist_config, \ ProfileConfigProvider from databricks_cli.version import print_version_callback, version as cli_version @click.command(context_settings=CONTEXT_SETTINGS) @click.option('--json-file', default=None, type=click.Path(), help='File containing JSON request to POST to /api/2.*/jobs/create.') @click.option('--json', default=None, type=JsonClickType(), help=JsonClickType.help('/api/2.*/jobs/create')) @api_version_option @debug_option @profile_option @eat_exceptions @provide_api_client def create_cli(api_client, json_file, json, version): """ Creates a job. The specification for the json option can be found https://docs.databricks.com/api/latest/jobs.html#create """ check_version(api_client, version) json_cli_base(json_file, json,