databricks.OnlineTable
Explore with Pulumi AI
Note This resource could be only used on Unity Catalog-enabled workspace!
This resource allows you to create Online Table 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
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 pulumi
import pulumi_databricks as databricks
this = databricks.OnlineTable("this",
name="main.default.online_table",
spec=databricks.OnlineTableSpecArgs(
source_table_full_name="main.default.source_table",
primary_key_columns=["id"],
run_triggered=databricks.OnlineTableSpecRunTriggeredArgs(),
))
package main
import (
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := databricks.NewOnlineTable(ctx, "this", &databricks.OnlineTableArgs{
Name: pulumi.String("main.default.online_table"),
Spec: &databricks.OnlineTableSpecArgs{
SourceTableFullName: pulumi.String("main.default.source_table"),
PrimaryKeyColumns: pulumi.StringArray{
pulumi.String("id"),
},
RunTriggered: nil,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var @this = new Databricks.OnlineTable("this", new()
{
Name = "main.default.online_table",
Spec = new Databricks.Inputs.OnlineTableSpecArgs
{
SourceTableFullName = "main.default.source_table",
PrimaryKeyColumns = new[]
{
"id",
},
RunTriggered = null,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.OnlineTable;
import com.pulumi.databricks.OnlineTableArgs;
import com.pulumi.databricks.inputs.OnlineTableSpecArgs;
import com.pulumi.databricks.inputs.OnlineTableSpecRunTriggeredArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var this_ = new OnlineTable("this", OnlineTableArgs.builder()
.name("main.default.online_table")
.spec(OnlineTableSpecArgs.builder()
.sourceTableFullName("main.default.source_table")
.primaryKeyColumns("id")
.runTriggered()
.build())
.build());
}
}
resources:
this:
type: databricks:OnlineTable
properties:
name: main.default.online_table
spec:
sourceTableFullName: main.default.source_table
primaryKeyColumns:
- id
runTriggered: {}
Create OnlineTable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OnlineTable(name: string, args?: OnlineTableArgs, opts?: CustomResourceOptions);
@overload
def OnlineTable(resource_name: str,
args: Optional[OnlineTableArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def OnlineTable(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
spec: Optional[OnlineTableSpecArgs] = None,
table_serving_url: Optional[str] = None)
func NewOnlineTable(ctx *Context, name string, args *OnlineTableArgs, opts ...ResourceOption) (*OnlineTable, error)
public OnlineTable(string name, OnlineTableArgs? args = null, CustomResourceOptions? opts = null)
public OnlineTable(String name, OnlineTableArgs args)
public OnlineTable(String name, OnlineTableArgs args, CustomResourceOptions options)
type: databricks:OnlineTable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args OnlineTableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args OnlineTableArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args OnlineTableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OnlineTableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OnlineTableArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var onlineTableResource = new Databricks.OnlineTable("onlineTableResource", new()
{
Name = "string",
Spec = new Databricks.Inputs.OnlineTableSpecArgs
{
PerformFullCopy = false,
PipelineId = "string",
PrimaryKeyColumns = new[]
{
"string",
},
RunContinuously = null,
RunTriggered = null,
SourceTableFullName = "string",
TimeseriesKey = "string",
},
TableServingUrl = "string",
});
example, err := databricks.NewOnlineTable(ctx, "onlineTableResource", &databricks.OnlineTableArgs{
Name: pulumi.String("string"),
Spec: &databricks.OnlineTableSpecArgs{
PerformFullCopy: pulumi.Bool(false),
PipelineId: pulumi.String("string"),
PrimaryKeyColumns: pulumi.StringArray{
pulumi.String("string"),
},
RunContinuously: nil,
RunTriggered: nil,
SourceTableFullName: pulumi.String("string"),
TimeseriesKey: pulumi.String("string"),
},
TableServingUrl: pulumi.String("string"),
})
var onlineTableResource = new OnlineTable("onlineTableResource", OnlineTableArgs.builder()
.name("string")
.spec(OnlineTableSpecArgs.builder()
.performFullCopy(false)
.pipelineId("string")
.primaryKeyColumns("string")
.runContinuously()
.runTriggered()
.sourceTableFullName("string")
.timeseriesKey("string")
.build())
.tableServingUrl("string")
.build());
online_table_resource = databricks.OnlineTable("onlineTableResource",
name="string",
spec=databricks.OnlineTableSpecArgs(
perform_full_copy=False,
pipeline_id="string",
primary_key_columns=["string"],
run_continuously=databricks.OnlineTableSpecRunContinuouslyArgs(),
run_triggered=databricks.OnlineTableSpecRunTriggeredArgs(),
source_table_full_name="string",
timeseries_key="string",
),
table_serving_url="string")
const onlineTableResource = new databricks.OnlineTable("onlineTableResource", {
name: "string",
spec: {
performFullCopy: false,
pipelineId: "string",
primaryKeyColumns: ["string"],
runContinuously: {},
runTriggered: {},
sourceTableFullName: "string",
timeseriesKey: "string",
},
tableServingUrl: "string",
});
type: databricks:OnlineTable
properties:
name: string
spec:
performFullCopy: false
pipelineId: string
primaryKeyColumns:
- string
runContinuously: {}
runTriggered: {}
sourceTableFullName: string
timeseriesKey: string
tableServingUrl: string
OnlineTable Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The OnlineTable resource accepts the following input properties:
- Name string
- 3-level name of the Online Table to create.
- Spec
Online
Table Spec - object containing specification of the online table:
- Table
Serving stringUrl
- Name string
- 3-level name of the Online Table to create.
- Spec
Online
Table Spec Args - object containing specification of the online table:
- Table
Serving stringUrl
- name String
- 3-level name of the Online Table to create.
- spec
Online
Table Spec - object containing specification of the online table:
- table
Serving StringUrl
- name string
- 3-level name of the Online Table to create.
- spec
Online
Table Spec - object containing specification of the online table:
- table
Serving stringUrl
- name str
- 3-level name of the Online Table to create.
- spec
Online
Table Spec Args - object containing specification of the online table:
- table_
serving_ strurl
- name String
- 3-level name of the Online Table to create.
- spec Property Map
- object containing specification of the online table:
- table
Serving StringUrl
Outputs
All input properties are implicitly available as output properties. Additionally, the OnlineTable resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Statuses
List<Online
Table Status> - object describing status of the online table:
- Id string
- The provider-assigned unique ID for this managed resource.
- Statuses
[]Online
Table Status - object describing status of the online table:
- id String
- The provider-assigned unique ID for this managed resource.
- statuses
List<Online
Table Status> - object describing status of the online table:
- id string
- The provider-assigned unique ID for this managed resource.
- statuses
Online
Table Status[] - object describing status of the online table:
- id str
- The provider-assigned unique ID for this managed resource.
- statuses
Sequence[Online
Table Status] - object describing status of the online table:
- id String
- The provider-assigned unique ID for this managed resource.
- statuses List<Property Map>
- object describing status of the online table:
Look up Existing OnlineTable Resource
Get an existing OnlineTable resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: OnlineTableState, opts?: CustomResourceOptions): OnlineTable
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
spec: Optional[OnlineTableSpecArgs] = None,
statuses: Optional[Sequence[OnlineTableStatusArgs]] = None,
table_serving_url: Optional[str] = None) -> OnlineTable
func GetOnlineTable(ctx *Context, name string, id IDInput, state *OnlineTableState, opts ...ResourceOption) (*OnlineTable, error)
public static OnlineTable Get(string name, Input<string> id, OnlineTableState? state, CustomResourceOptions? opts = null)
public static OnlineTable get(String name, Output<String> id, OnlineTableState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Name string
- 3-level name of the Online Table to create.
- Spec
Online
Table Spec - object containing specification of the online table:
- Statuses
List<Online
Table Status> - object describing status of the online table:
- Table
Serving stringUrl
- Name string
- 3-level name of the Online Table to create.
- Spec
Online
Table Spec Args - object containing specification of the online table:
- Statuses
[]Online
Table Status Args - object describing status of the online table:
- Table
Serving stringUrl
- name String
- 3-level name of the Online Table to create.
- spec
Online
Table Spec - object containing specification of the online table:
- statuses
List<Online
Table Status> - object describing status of the online table:
- table
Serving StringUrl
- name string
- 3-level name of the Online Table to create.
- spec
Online
Table Spec - object containing specification of the online table:
- statuses
Online
Table Status[] - object describing status of the online table:
- table
Serving stringUrl
- name str
- 3-level name of the Online Table to create.
- spec
Online
Table Spec Args - object containing specification of the online table:
- statuses
Sequence[Online
Table Status Args] - object describing status of the online table:
- table_
serving_ strurl
- name String
- 3-level name of the Online Table to create.
- spec Property Map
- object containing specification of the online table:
- statuses List<Property Map>
- object describing status of the online table:
- table
Serving StringUrl
Supporting Types
OnlineTableSpec, OnlineTableSpecArgs
- Perform
Full boolCopy - Whether to create a full-copy pipeline -- a pipeline that stops after creates a full copy of the source table upon initialization and does not process any change data feeds (CDFs) afterwards. The pipeline can still be manually triggered afterwards, but it always perform a full copy of the source table and there are no incremental updates. This mode is useful for syncing views or tables without CDFs to online tables. Note that the full-copy pipeline only supports "triggered" scheduling policy.
- Pipeline
Id string - ID of the associated Delta Live Table pipeline.
- Primary
Key List<string>Columns - list of the columns comprising the primary key.
- Run
Continuously OnlineTable Spec Run Continuously - empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with
run_triggered
. - Run
Triggered OnlineTable Spec Run Triggered - empty block that specifies that pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers).
- Source
Table stringFull Name - full name of the source table.
- Timeseries
Key string - Time series key to deduplicate (tie-break) rows with the same primary key.
- Perform
Full boolCopy - Whether to create a full-copy pipeline -- a pipeline that stops after creates a full copy of the source table upon initialization and does not process any change data feeds (CDFs) afterwards. The pipeline can still be manually triggered afterwards, but it always perform a full copy of the source table and there are no incremental updates. This mode is useful for syncing views or tables without CDFs to online tables. Note that the full-copy pipeline only supports "triggered" scheduling policy.
- Pipeline
Id string - ID of the associated Delta Live Table pipeline.
- Primary
Key []stringColumns - list of the columns comprising the primary key.
- Run
Continuously OnlineTable Spec Run Continuously - empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with
run_triggered
. - Run
Triggered OnlineTable Spec Run Triggered - empty block that specifies that pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers).
- Source
Table stringFull Name - full name of the source table.
- Timeseries
Key string - Time series key to deduplicate (tie-break) rows with the same primary key.
- perform
Full BooleanCopy - Whether to create a full-copy pipeline -- a pipeline that stops after creates a full copy of the source table upon initialization and does not process any change data feeds (CDFs) afterwards. The pipeline can still be manually triggered afterwards, but it always perform a full copy of the source table and there are no incremental updates. This mode is useful for syncing views or tables without CDFs to online tables. Note that the full-copy pipeline only supports "triggered" scheduling policy.
- pipeline
Id String - ID of the associated Delta Live Table pipeline.
- primary
Key List<String>Columns - list of the columns comprising the primary key.
- run
Continuously OnlineTable Spec Run Continuously - empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with
run_triggered
. - run
Triggered OnlineTable Spec Run Triggered - empty block that specifies that pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers).
- source
Table StringFull Name - full name of the source table.
- timeseries
Key String - Time series key to deduplicate (tie-break) rows with the same primary key.
- perform
Full booleanCopy - Whether to create a full-copy pipeline -- a pipeline that stops after creates a full copy of the source table upon initialization and does not process any change data feeds (CDFs) afterwards. The pipeline can still be manually triggered afterwards, but it always perform a full copy of the source table and there are no incremental updates. This mode is useful for syncing views or tables without CDFs to online tables. Note that the full-copy pipeline only supports "triggered" scheduling policy.
- pipeline
Id string - ID of the associated Delta Live Table pipeline.
- primary
Key string[]Columns - list of the columns comprising the primary key.
- run
Continuously OnlineTable Spec Run Continuously - empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with
run_triggered
. - run
Triggered OnlineTable Spec Run Triggered - empty block that specifies that pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers).
- source
Table stringFull Name - full name of the source table.
- timeseries
Key string - Time series key to deduplicate (tie-break) rows with the same primary key.
- perform_
full_ boolcopy - Whether to create a full-copy pipeline -- a pipeline that stops after creates a full copy of the source table upon initialization and does not process any change data feeds (CDFs) afterwards. The pipeline can still be manually triggered afterwards, but it always perform a full copy of the source table and there are no incremental updates. This mode is useful for syncing views or tables without CDFs to online tables. Note that the full-copy pipeline only supports "triggered" scheduling policy.
- pipeline_
id str - ID of the associated Delta Live Table pipeline.
- primary_
key_ Sequence[str]columns - list of the columns comprising the primary key.
- run_
continuously OnlineTable Spec Run Continuously - empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with
run_triggered
. - run_
triggered OnlineTable Spec Run Triggered - empty block that specifies that pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers).
- source_
table_ strfull_ name - full name of the source table.
- timeseries_
key str - Time series key to deduplicate (tie-break) rows with the same primary key.
- perform
Full BooleanCopy - Whether to create a full-copy pipeline -- a pipeline that stops after creates a full copy of the source table upon initialization and does not process any change data feeds (CDFs) afterwards. The pipeline can still be manually triggered afterwards, but it always perform a full copy of the source table and there are no incremental updates. This mode is useful for syncing views or tables without CDFs to online tables. Note that the full-copy pipeline only supports "triggered" scheduling policy.
- pipeline
Id String - ID of the associated Delta Live Table pipeline.
- primary
Key List<String>Columns - list of the columns comprising the primary key.
- run
Continuously Property Map - empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with
run_triggered
. - run
Triggered Property Map - empty block that specifies that pipeline stops after generating the initial data and can be triggered later (manually, through a cron job or through data triggers).
- source
Table StringFull Name - full name of the source table.
- timeseries
Key String - Time series key to deduplicate (tie-break) rows with the same primary key.
OnlineTableStatus, OnlineTableStatusArgs
- Continuous
Update OnlineStatus Table Status Continuous Update Status - Detailed
State string - The state of the online table.
- Failed
Status OnlineTable Status Failed Status - Message string
- A text description of the current state of the online table.
- Provisioning
Status OnlineTable Status Provisioning Status - Triggered
Update OnlineStatus Table Status Triggered Update Status
- Continuous
Update OnlineStatus Table Status Continuous Update Status - Detailed
State string - The state of the online table.
- Failed
Status OnlineTable Status Failed Status - Message string
- A text description of the current state of the online table.
- Provisioning
Status OnlineTable Status Provisioning Status - Triggered
Update OnlineStatus Table Status Triggered Update Status
- continuous
Update OnlineStatus Table Status Continuous Update Status - detailed
State String - The state of the online table.
- failed
Status OnlineTable Status Failed Status - message String
- A text description of the current state of the online table.
- provisioning
Status OnlineTable Status Provisioning Status - triggered
Update OnlineStatus Table Status Triggered Update Status
- continuous
Update OnlineStatus Table Status Continuous Update Status - detailed
State string - The state of the online table.
- failed
Status OnlineTable Status Failed Status - message string
- A text description of the current state of the online table.
- provisioning
Status OnlineTable Status Provisioning Status - triggered
Update OnlineStatus Table Status Triggered Update Status
- continuous_
update_ Onlinestatus Table Status Continuous Update Status - detailed_
state str - The state of the online table.
- failed_
status OnlineTable Status Failed Status - message str
- A text description of the current state of the online table.
- provisioning_
status OnlineTable Status Provisioning Status - triggered_
update_ Onlinestatus Table Status Triggered Update Status
- continuous
Update Property MapStatus - detailed
State String - The state of the online table.
- failed
Status Property Map - message String
- A text description of the current state of the online table.
- provisioning
Status Property Map - triggered
Update Property MapStatus
OnlineTableStatusContinuousUpdateStatus, OnlineTableStatusContinuousUpdateStatusArgs
OnlineTableStatusContinuousUpdateStatusInitialPipelineSyncProgress, OnlineTableStatusContinuousUpdateStatusInitialPipelineSyncProgressArgs
- Estimated
Completion float64Time Seconds - Latest
Version intCurrently Processing - Sync
Progress float64Completion - Synced
Row intCount - Total
Row intCount
- estimated
Completion DoubleTime Seconds - latest
Version IntegerCurrently Processing - sync
Progress DoubleCompletion - synced
Row IntegerCount - total
Row IntegerCount
- estimated
Completion numberTime Seconds - latest
Version numberCurrently Processing - sync
Progress numberCompletion - synced
Row numberCount - total
Row numberCount
- estimated
Completion NumberTime Seconds - latest
Version NumberCurrently Processing - sync
Progress NumberCompletion - synced
Row NumberCount - total
Row NumberCount
OnlineTableStatusFailedStatus, OnlineTableStatusFailedStatusArgs
- Last
Processed intCommit Version - Timestamp string
- Last
Processed intCommit Version - Timestamp string
- last
Processed IntegerCommit Version - timestamp String
- last
Processed numberCommit Version - timestamp string
- last
Processed NumberCommit Version - timestamp String
OnlineTableStatusProvisioningStatus, OnlineTableStatusProvisioningStatusArgs
OnlineTableStatusProvisioningStatusInitialPipelineSyncProgress, OnlineTableStatusProvisioningStatusInitialPipelineSyncProgressArgs
- Estimated
Completion float64Time Seconds - Latest
Version intCurrently Processing - Sync
Progress float64Completion - Synced
Row intCount - Total
Row intCount
- estimated
Completion DoubleTime Seconds - latest
Version IntegerCurrently Processing - sync
Progress DoubleCompletion - synced
Row IntegerCount - total
Row IntegerCount
- estimated
Completion numberTime Seconds - latest
Version numberCurrently Processing - sync
Progress numberCompletion - synced
Row numberCount - total
Row numberCount
- estimated
Completion NumberTime Seconds - latest
Version NumberCurrently Processing - sync
Progress NumberCompletion - synced
Row NumberCount - total
Row NumberCount
OnlineTableStatusTriggeredUpdateStatus, OnlineTableStatusTriggeredUpdateStatusArgs
OnlineTableStatusTriggeredUpdateStatusTriggeredUpdateProgress, OnlineTableStatusTriggeredUpdateStatusTriggeredUpdateProgressArgs
- Estimated
Completion float64Time Seconds - Latest
Version intCurrently Processing - Sync
Progress float64Completion - Synced
Row intCount - Total
Row intCount
- estimated
Completion DoubleTime Seconds - latest
Version IntegerCurrently Processing - sync
Progress DoubleCompletion - synced
Row IntegerCount - total
Row IntegerCount
- estimated
Completion numberTime Seconds - latest
Version numberCurrently Processing - sync
Progress numberCompletion - synced
Row numberCount - total
Row numberCount
- estimated
Completion NumberTime Seconds - latest
Version NumberCurrently Processing - sync
Progress NumberCompletion - synced
Row NumberCount - total
Row NumberCount
Import
The resource can be imported using the name of the Online Table:
bash
$ pulumi import databricks:index/onlineTable:OnlineTable this <endpoint-name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.