1. Packages
  2. DataRobot
  3. API Docs
  4. DatasetFromFile
DataRobot v0.9.0 published on Tuesday, Apr 8, 2025 by DataRobot, Inc.

datarobot.DatasetFromFile

Explore with Pulumi AI

Data set from file

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as datarobot from "@datarobot/pulumi-datarobot";

const example = new datarobot.DatasetFromFile("example", {
    filePath: "[Path to file to upload]",
    useCaseIds: [datarobot_use_case.example.id],
});
export const exampleId = example.id;
Copy
import pulumi
import pulumi_datarobot as datarobot

example = datarobot.DatasetFromFile("example",
    file_path="[Path to file to upload]",
    use_case_ids=[datarobot_use_case["example"]["id"]])
pulumi.export("exampleId", example.id)
Copy
package main

import (
	"github.com/datarobot-community/pulumi-datarobot/sdk/go/datarobot"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := datarobot.NewDatasetFromFile(ctx, "example", &datarobot.DatasetFromFileArgs{
			FilePath: pulumi.String("[Path to file to upload]"),
			UseCaseIds: pulumi.StringArray{
				datarobot_use_case.Example.Id,
			},
		})
		if err != nil {
			return err
		}
		ctx.Export("exampleId", example.ID())
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datarobot = DataRobotPulumi.Datarobot;

return await Deployment.RunAsync(() => 
{
    var example = new Datarobot.DatasetFromFile("example", new()
    {
        FilePath = "[Path to file to upload]",
        UseCaseIds = new[]
        {
            datarobot_use_case.Example.Id,
        },
    });

    return new Dictionary<string, object?>
    {
        ["exampleId"] = example.Id,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datarobot.DatasetFromFile;
import com.pulumi.datarobot.DatasetFromFileArgs;
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 example = new DatasetFromFile("example", DatasetFromFileArgs.builder()
            .filePath("[Path to file to upload]")
            .useCaseIds(datarobot_use_case.example().id())
            .build());

        ctx.export("exampleId", example.id());
    }
}
Copy
resources:
  example:
    type: datarobot:DatasetFromFile
    properties:
      filePath: '[Path to file to upload]'
      useCaseIds:
        - ${datarobot_use_case.example.id}
outputs:
  exampleId: ${example.id}
Copy

Create DatasetFromFile Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DatasetFromFile(name: string, args: DatasetFromFileArgs, opts?: CustomResourceOptions);
@overload
def DatasetFromFile(resource_name: str,
                    args: DatasetFromFileArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def DatasetFromFile(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    file_path: Optional[str] = None,
                    name: Optional[str] = None,
                    use_case_ids: Optional[Sequence[str]] = None)
func NewDatasetFromFile(ctx *Context, name string, args DatasetFromFileArgs, opts ...ResourceOption) (*DatasetFromFile, error)
public DatasetFromFile(string name, DatasetFromFileArgs args, CustomResourceOptions? opts = null)
public DatasetFromFile(String name, DatasetFromFileArgs args)
public DatasetFromFile(String name, DatasetFromFileArgs args, CustomResourceOptions options)
type: datarobot:DatasetFromFile
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DatasetFromFileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DatasetFromFileArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DatasetFromFileArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DatasetFromFileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DatasetFromFileArgs
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 datasetFromFileResource = new Datarobot.DatasetFromFile("datasetFromFileResource", new()
{
    FilePath = "string",
    Name = "string",
    UseCaseIds = new[]
    {
        "string",
    },
});
Copy
example, err := datarobot.NewDatasetFromFile(ctx, "datasetFromFileResource", &datarobot.DatasetFromFileArgs{
	FilePath: pulumi.String("string"),
	Name:     pulumi.String("string"),
	UseCaseIds: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var datasetFromFileResource = new DatasetFromFile("datasetFromFileResource", DatasetFromFileArgs.builder()
    .filePath("string")
    .name("string")
    .useCaseIds("string")
    .build());
Copy
dataset_from_file_resource = datarobot.DatasetFromFile("datasetFromFileResource",
    file_path="string",
    name="string",
    use_case_ids=["string"])
Copy
const datasetFromFileResource = new datarobot.DatasetFromFile("datasetFromFileResource", {
    filePath: "string",
    name: "string",
    useCaseIds: ["string"],
});
Copy
type: datarobot:DatasetFromFile
properties:
    filePath: string
    name: string
    useCaseIds:
        - string
Copy

DatasetFromFile Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DatasetFromFile resource accepts the following input properties:

FilePath This property is required. string
The path to the file to upload.
Name string
The name of the Dataset. Defaults to the file name.
UseCaseIds List<string>
The list of Use Case IDs to add the Dataset to.
FilePath This property is required. string
The path to the file to upload.
Name string
The name of the Dataset. Defaults to the file name.
UseCaseIds []string
The list of Use Case IDs to add the Dataset to.
filePath This property is required. String
The path to the file to upload.
name String
The name of the Dataset. Defaults to the file name.
useCaseIds List<String>
The list of Use Case IDs to add the Dataset to.
filePath This property is required. string
The path to the file to upload.
name string
The name of the Dataset. Defaults to the file name.
useCaseIds string[]
The list of Use Case IDs to add the Dataset to.
file_path This property is required. str
The path to the file to upload.
name str
The name of the Dataset. Defaults to the file name.
use_case_ids Sequence[str]
The list of Use Case IDs to add the Dataset to.
filePath This property is required. String
The path to the file to upload.
name String
The name of the Dataset. Defaults to the file name.
useCaseIds List<String>
The list of Use Case IDs to add the Dataset to.

Outputs

All input properties are implicitly available as output properties. Additionally, the DatasetFromFile resource produces the following output properties:

FileHash string
The hash of the file contents.
Id string
The provider-assigned unique ID for this managed resource.
FileHash string
The hash of the file contents.
Id string
The provider-assigned unique ID for this managed resource.
fileHash String
The hash of the file contents.
id String
The provider-assigned unique ID for this managed resource.
fileHash string
The hash of the file contents.
id string
The provider-assigned unique ID for this managed resource.
file_hash str
The hash of the file contents.
id str
The provider-assigned unique ID for this managed resource.
fileHash String
The hash of the file contents.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing DatasetFromFile Resource

Get an existing DatasetFromFile 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?: DatasetFromFileState, opts?: CustomResourceOptions): DatasetFromFile
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        file_hash: Optional[str] = None,
        file_path: Optional[str] = None,
        name: Optional[str] = None,
        use_case_ids: Optional[Sequence[str]] = None) -> DatasetFromFile
func GetDatasetFromFile(ctx *Context, name string, id IDInput, state *DatasetFromFileState, opts ...ResourceOption) (*DatasetFromFile, error)
public static DatasetFromFile Get(string name, Input<string> id, DatasetFromFileState? state, CustomResourceOptions? opts = null)
public static DatasetFromFile get(String name, Output<String> id, DatasetFromFileState state, CustomResourceOptions options)
resources:  _:    type: datarobot:DatasetFromFile    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
FileHash string
The hash of the file contents.
FilePath string
The path to the file to upload.
Name string
The name of the Dataset. Defaults to the file name.
UseCaseIds List<string>
The list of Use Case IDs to add the Dataset to.
FileHash string
The hash of the file contents.
FilePath string
The path to the file to upload.
Name string
The name of the Dataset. Defaults to the file name.
UseCaseIds []string
The list of Use Case IDs to add the Dataset to.
fileHash String
The hash of the file contents.
filePath String
The path to the file to upload.
name String
The name of the Dataset. Defaults to the file name.
useCaseIds List<String>
The list of Use Case IDs to add the Dataset to.
fileHash string
The hash of the file contents.
filePath string
The path to the file to upload.
name string
The name of the Dataset. Defaults to the file name.
useCaseIds string[]
The list of Use Case IDs to add the Dataset to.
file_hash str
The hash of the file contents.
file_path str
The path to the file to upload.
name str
The name of the Dataset. Defaults to the file name.
use_case_ids Sequence[str]
The list of Use Case IDs to add the Dataset to.
fileHash String
The hash of the file contents.
filePath String
The path to the file to upload.
name String
The name of the Dataset. Defaults to the file name.
useCaseIds List<String>
The list of Use Case IDs to add the Dataset to.

Package Details

Repository
datarobot datarobot-community/pulumi-datarobot
License
Apache-2.0
Notes
This Pulumi package is based on the datarobot Terraform Provider.