UNPKG

databricks-cli

Version:

A CLI tool for quick Databricks tasks

31 lines (30 loc) 1.3 kB
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const commander_1 = require("commander"); const describe_table_1 = require("./commands/describe-table"); const init_1 = require("./commands/init"); const print_row_1 = require("./commands/print-row"); const program = new commander_1.Command(); program .name("databricks-cli") .description("CLI tool for quick Databricks tasks") .version("1.0.0"); program .command("init") .description("Initialize Databricks CLI configuration") .action(init_1.init); program .command("describe-table") .description("Describe a Databricks SQL table") .option("-t, --table <table>", "Table name (optional, will prompt if not provided)") .option("-d, --database <database>", "Database name (optional, will prompt if not provided)") .action(describe_table_1.describeTable); program .command("print-row") .description("Print rows from a Databricks SQL table") .option("-t, --table <table>", "Table name (optional, will prompt if not provided)") .option("-d, --database <database>", "Database name (optional, will prompt if not provided)") .option("-c, --count <count>", "Number of rows to print (default: 10)") .action(print_row_1.printRow); program.parse();