npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ecoding.dev/databricks-api

v3.0.5

Published

Databricks API wrapper

Downloads

8

Readme

Databricks Node.js Library

npm

This is a simple API wrapper to provide access to the databricks API.

Documentation

Databricks API Documentation

Installation

Install the package:

npm install @ecoding.dev/databricks-api --save

Usage


const Databricks = require('databricks-api');

const HOST = '12345-abcdef-678.cloud.databricks.com';
const AUTH_TOKEN = '123456789abcdefghi';

const databricks = new Databricks(HOST, AUTH_TOKEN);

(async () => {
    const clusters = await databricks.Clusters.list();
    console.log(clusters);
})();

TESTED AND WORKING

  • [ ] Clusters
  • [ ] Groups
  • [ ] Instance Pools
  • [ ] Libraries
  • [x] Secrets
  • [ ] Tokens

REPORTING ISSUES

If you find any issues, please report them in the issue tracker

TODO

  • Jobs routes
  • DBFS routes
  • SCIM routes (when implemented)

Methods

Clusters

create
Clusters.create(node_type_id, spark_version, size, optionalParams)
edit
Clusters.edit(cluster_id, clusterParams)
get
Clusters.get(cluster_id)
list
Clusters.list()
listZones
Clusters.listZones()
listNodeTypes
Clusters.listNodeTypes()
start
Clusters.start(cluster_id)
restart
Clusters.restart(cluster_id)
resize
Clusters.resize(cluster_id, num_workers)
delete
Clusters.delete(cluster_id)
permanentDelete
Clusters.permanentDelete(cluster_id)
pin
Clusters.pin(cluster_id)
unpin
Clusters.unpin(cluster_id)
sparkVersions
Clusters.sparkVersions()
events
Clusters.events(cluster_id, start_time)

Groups

addMember
Groups.addMember(user_name, parent_name)
addSubGroup
Groups.addSubGroup(group_name, parent_name)
create
Groups.create(group_name)
delete
Groups.delete(group_name)
list
Groups.list()
listMembers
Groups.listMembers(group_name)
listMemberParents
Groups.listMemberParents(user_name)
listGroupParents
Groups.listGroupParents(group_name)
removeSubGroupFromGroup
Groups.removeSubGroupFromGroup(group_name, parent_name)
removeUserFromGroup
Groups.removeUserFromGroup(user_name, parent_name)

Instance Profiles

add
InstanceProfiles.add(instance_profile_arn, skip_validation)
list
InstanceProfiles.list()
remove
InstanceProfiles.remove(instance_profile_arn)

Libraries

create
Libraries.create(lifetime_seconds, comment)
allClusterStatuses
Libraries.allClusterStatuses()
clusterStatus
Libraries.clusterStatus()
install
Libraries.install(cluster_id, libraries)
uninstall
Libraries.uninstall(cluster_id, libraries)

Secrets

listScopes
Secrets.listScopes()
createScope
Secrets.createScope(scope, initial_manage_principal)
deleteScope
Secrets.deleteScope(scope)
put
Secrets.put(scope, key, string_value)
delete
Secrets.delete(scope, key)
list
Secrets.list(scope)
putSecretAcl
Secrets.putSecretAcl(scope, principal, permission)
deleteSecretAcl
Secrets.deleteSecretAcl(scope, principal)
getSecretAcl
Secrets.getSecretAcl(principal, permission)
listSecretAcl
Secrets.listSecretAcl(scope)

Tokens

create
Tokens.create(lifetime_seconds, comment)
list
Tokens.list()
revoke
Tokens.revoke(token_id)

Workspaces

export
Workspaces.export(path, format, direct_download)
import
Workspaces.import(path, format, language, content, overwrite)
delete
Workspaces.delete(path, recursive)
mkdirs
Workspaces.mkdirs(path)
list
Workspaces.list(path)
getStatus
Workspaces.getStatus(path)