@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
88 lines • 4.02 kB
JavaScript
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.OnlineTable = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > This resource can only be used on a Unity Catalog-enabled workspace!
*
* This resource allows you to create [Online Table](https://docs.databricks.com/en/machine-learning/feature-store/online-tables.html) in Databricks. An online table is a read-only copy of a Delta Table that is stored in row-oriented format optimized for online access. Online tables are fully serverless tables that auto-scale throughput capacity with the request load and provide low latency and high throughput access to data of any scale. Online tables are designed to work with Databricks Model Serving, Feature Serving, and retrieval-augmented generation (RAG) applications where they are used for fast data lookups.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = new databricks.OnlineTable("this", {
* name: "main.default.online_table",
* spec: {
* sourceTableFullName: "main.default.source_table",
* primaryKeyColumns: ["id"],
* runTriggered: {},
* },
* });
* ```
*
* ## Import
*
* The resource can be imported using the name of the Online Table:
*
* bash
*
* ```sh
* $ pulumi import databricks:index/onlineTable:OnlineTable this <endpoint-name>
* ```
*/
class OnlineTable extends pulumi.CustomResource {
/**
* Get an existing OnlineTable resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new OnlineTable(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of OnlineTable. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === OnlineTable.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["spec"] = state ? state.spec : undefined;
resourceInputs["statuses"] = state ? state.statuses : undefined;
resourceInputs["tableServingUrl"] = state ? state.tableServingUrl : undefined;
resourceInputs["unityCatalogProvisioningState"] = state ? state.unityCatalogProvisioningState : undefined;
}
else {
const args = argsOrState;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["spec"] = args ? args.spec : undefined;
resourceInputs["statuses"] = undefined /*out*/;
resourceInputs["tableServingUrl"] = undefined /*out*/;
resourceInputs["unityCatalogProvisioningState"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(OnlineTable.__pulumiType, name, resourceInputs, opts);
}
}
exports.OnlineTable = OnlineTable;
/** @internal */
OnlineTable.__pulumiType = 'databricks:index/onlineTable:OnlineTable';
//# sourceMappingURL=onlineTable.js.map
;