1. Packages
  2. Databricks
  3. API Docs
  4. OnlineTable
Databricks v1.38.0 published on Monday, Apr 29, 2024 by Pulumi

databricks.OnlineTable

Explore with Pulumi AI

databricks logo
Databricks v1.38.0 published on Monday, Apr 29, 2024 by Pulumi

    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)
    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.

    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",
        },
    });
    
    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"),
    	},
    })
    
    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())
        .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",
        ))
    
    const onlineTableResource = new databricks.OnlineTable("onlineTableResource", {
        name: "string",
        spec: {
            performFullCopy: false,
            pipelineId: "string",
            primaryKeyColumns: ["string"],
            runContinuously: {},
            runTriggered: {},
            sourceTableFullName: "string",
            timeseriesKey: "string",
        },
    });
    
    type: databricks:OnlineTable
    properties:
        name: string
        spec:
            performFullCopy: false
            pipelineId: string
            primaryKeyColumns:
                - string
            runContinuously: {}
            runTriggered: {}
            sourceTableFullName: string
            timeseriesKey: 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 OnlineTableSpec
    object containing specification of the online table:
    Name string
    3-level name of the Online Table to create.
    Spec OnlineTableSpecArgs
    object containing specification of the online table:
    name String
    3-level name of the Online Table to create.
    spec OnlineTableSpec
    object containing specification of the online table:
    name string
    3-level name of the Online Table to create.
    spec OnlineTableSpec
    object containing specification of the online table:
    name str
    3-level name of the Online Table to create.
    spec OnlineTableSpecArgs
    object containing specification of the online table:
    name String
    3-level name of the Online Table to create.
    spec Property Map
    object containing specification of the online table:

    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<OnlineTableStatus>
    object describing status of the online table:
    Id string
    The provider-assigned unique ID for this managed resource.
    Statuses []OnlineTableStatus
    object describing status of the online table:
    id String
    The provider-assigned unique ID for this managed resource.
    statuses List<OnlineTableStatus>
    object describing status of the online table:
    id string
    The provider-assigned unique ID for this managed resource.
    statuses OnlineTableStatus[]
    object describing status of the online table:
    id str
    The provider-assigned unique ID for this managed resource.
    statuses Sequence[OnlineTableStatus]
    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) -> 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.
    The following state arguments are supported:
    Name string
    3-level name of the Online Table to create.
    Spec OnlineTableSpec
    object containing specification of the online table:
    Statuses List<OnlineTableStatus>
    object describing status of the online table:
    Name string
    3-level name of the Online Table to create.
    Spec OnlineTableSpecArgs
    object containing specification of the online table:
    Statuses []OnlineTableStatusArgs
    object describing status of the online table:
    name String
    3-level name of the Online Table to create.
    spec OnlineTableSpec
    object containing specification of the online table:
    statuses List<OnlineTableStatus>
    object describing status of the online table:
    name string
    3-level name of the Online Table to create.
    spec OnlineTableSpec
    object containing specification of the online table:
    statuses OnlineTableStatus[]
    object describing status of the online table:
    name str
    3-level name of the Online Table to create.
    spec OnlineTableSpecArgs
    object containing specification of the online table:
    statuses Sequence[OnlineTableStatusArgs]
    object describing status of the online table:
    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:

    Supporting Types

    OnlineTableSpec, OnlineTableSpecArgs

    PerformFullCopy bool
    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.
    PipelineId string
    ID of the associated Delta Live Table pipeline.
    PrimaryKeyColumns List<string>
    list of the columns comprising the primary key.
    RunContinuously OnlineTableSpecRunContinuously
    empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with run_triggered.
    RunTriggered OnlineTableSpecRunTriggered
    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).
    SourceTableFullName string
    full name of the source table.
    TimeseriesKey string
    Time series key to deduplicate (tie-break) rows with the same primary key.
    PerformFullCopy bool
    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.
    PipelineId string
    ID of the associated Delta Live Table pipeline.
    PrimaryKeyColumns []string
    list of the columns comprising the primary key.
    RunContinuously OnlineTableSpecRunContinuously
    empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with run_triggered.
    RunTriggered OnlineTableSpecRunTriggered
    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).
    SourceTableFullName string
    full name of the source table.
    TimeseriesKey string
    Time series key to deduplicate (tie-break) rows with the same primary key.
    performFullCopy Boolean
    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.
    pipelineId String
    ID of the associated Delta Live Table pipeline.
    primaryKeyColumns List<String>
    list of the columns comprising the primary key.
    runContinuously OnlineTableSpecRunContinuously
    empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with run_triggered.
    runTriggered OnlineTableSpecRunTriggered
    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).
    sourceTableFullName String
    full name of the source table.
    timeseriesKey String
    Time series key to deduplicate (tie-break) rows with the same primary key.
    performFullCopy boolean
    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.
    pipelineId string
    ID of the associated Delta Live Table pipeline.
    primaryKeyColumns string[]
    list of the columns comprising the primary key.
    runContinuously OnlineTableSpecRunContinuously
    empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with run_triggered.
    runTriggered OnlineTableSpecRunTriggered
    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).
    sourceTableFullName string
    full name of the source table.
    timeseriesKey string
    Time series key to deduplicate (tie-break) rows with the same primary key.
    perform_full_copy bool
    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_columns Sequence[str]
    list of the columns comprising the primary key.
    run_continuously OnlineTableSpecRunContinuously
    empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with run_triggered.
    run_triggered OnlineTableSpecRunTriggered
    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_full_name str
    full name of the source table.
    timeseries_key str
    Time series key to deduplicate (tie-break) rows with the same primary key.
    performFullCopy Boolean
    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.
    pipelineId String
    ID of the associated Delta Live Table pipeline.
    primaryKeyColumns List<String>
    list of the columns comprising the primary key.
    runContinuously Property Map
    empty block that specifies that pipeline runs continuously after generating the initial data. Conflicts with run_triggered.
    runTriggered 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).
    sourceTableFullName String
    full name of the source table.
    timeseriesKey String
    Time series key to deduplicate (tie-break) rows with the same primary key.

    OnlineTableStatus, OnlineTableStatusArgs

    continuousUpdateStatus Property Map
    detailedState String
    The state of the online table.
    failedStatus Property Map
    message String
    A text description of the current state of the online table.
    provisioningStatus Property Map
    triggeredUpdateStatus Property Map

    OnlineTableStatusContinuousUpdateStatus, OnlineTableStatusContinuousUpdateStatusArgs

    OnlineTableStatusContinuousUpdateStatusInitialPipelineSyncProgress, OnlineTableStatusContinuousUpdateStatusInitialPipelineSyncProgressArgs

    OnlineTableStatusFailedStatus, OnlineTableStatusFailedStatusArgs

    OnlineTableStatusProvisioningStatus, OnlineTableStatusProvisioningStatusArgs

    OnlineTableStatusProvisioningStatusInitialPipelineSyncProgress, OnlineTableStatusProvisioningStatusInitialPipelineSyncProgressArgs

    OnlineTableStatusTriggeredUpdateStatus, OnlineTableStatusTriggeredUpdateStatusArgs

    OnlineTableStatusTriggeredUpdateStatusTriggeredUpdateProgress, OnlineTableStatusTriggeredUpdateStatusTriggeredUpdateProgressArgs

    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.
    databricks logo
    Databricks v1.38.0 published on Monday, Apr 29, 2024 by Pulumi