Skip to content

azurermDataFactoryDatasetSqlServer

Manages a SQL Server Table Dataset inside a Azure Data Factory.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermDataFactoryExample = new azurerm.dataFactory.DataFactory(
  this,
  "example_1",
  {
    location: azurermResourceGroupExample.location,
    name: "example",
    resource_group_name: azurermResourceGroupExample.name,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataFactoryExample.overrideLogicalId("example");
const azurermDataFactoryLinkedServiceSqlServerExample =
  new azurerm.dataFactoryLinkedServiceSqlServer.DataFactoryLinkedServiceSqlServer(
    this,
    "example_2",
    {
      connection_string:
        "Integrated Security=False;Data Source=test;Initial Catalog=test;User ID=test;Password=test",
      data_factory_id: azurermDataFactoryExample.id,
      name: "example",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataFactoryLinkedServiceSqlServerExample.overrideLogicalId("example");
const azurermDataFactoryDatasetSqlServerTableExample =
  new azurerm.dataFactoryDatasetSqlServerTable.DataFactoryDatasetSqlServerTable(
    this,
    "example_3",
    {
      data_factory_id: azurermDataFactoryExample.id,
      linked_service_name: azurermDataFactoryLinkedServiceSqlServerExample.name,
      name: "example",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataFactoryDatasetSqlServerTableExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Data Factory Dataset SQL Server Table. Changing this forces a new resource to be created. Must be globally unique. See the Microsoft documentation for all restrictions.

  • dataFactoryId - (Required) The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.

  • linkedServiceName - (Required) The Data Factory Linked Service name in which to associate the Dataset with.

  • tableName - (Optional) The table name of the Data Factory Dataset SQL Server Table.

  • folder - (Optional) The folder that this Dataset is in. If not specified, the Dataset will appear at the root level.

  • schemaColumn - (Optional) A schemaColumn block as defined below.

  • description - (Optional) The description for the Data Factory Dataset SQL Server Table.

  • annotations - (Optional) List of tags that can be used for describing the Data Factory Dataset SQL Server Table.

  • parameters - (Optional) A map of parameters to associate with the Data Factory Dataset SQL Server Table.

  • additionalProperties - (Optional) A map of additional properties to associate with the Data Factory Dataset SQL Server Table.


A schemaColumn block supports the following:

  • name - (Required) The name of the column.

  • type - (Optional) Type of the column. Valid values are byte, byte[], boolean, date, dateTime,dateTimeOffset, decimal, double, guid, int16, int32, int64, single, string, timeSpan. Please note these values are case sensitive.

  • description - (Optional) The description of the column.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Data Factory SQL Server Table Dataset.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Data Factory SQL Server Table Dataset.
  • update - (Defaults to 30 minutes) Used when updating the Data Factory SQL Server Table Dataset.
  • read - (Defaults to 5 minutes) Used when retrieving the Data Factory SQL Server Table Dataset.
  • delete - (Defaults to 30 minutes) Used when deleting the Data Factory SQL Server Table Dataset.

Import

Data Factory SQL Server Table Datasets can be imported using the resourceId, e.g.

terraform import azurerm_data_factory_dataset_sql_server_table.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/datasets/example