hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.64k forks source link

Support for compression/format in azurerm_data_factory_dataset_azure_blob #8418

Open SimonGasparKentico opened 4 years ago

SimonGasparKentico commented 4 years ago

Community Note

Terraform (and AzureRM Provider) Version

Terraform 0.12.29 AzureRM 2.26.0

Affected Resource(s)

Description

Now there is no option to set compression or format for azurerm_data_factory_dataset_azure_blob.

Potential Terraform Configuration

I want to set compression and format blocks for blob's dataset. Something like this

resource "azurerm_data_factory_dataset_azure_blob" "example" {
  name                = "name"
  resource_group_name = "resource_group_name"
  data_factory_name   = "data_factory_name"
  linked_service_name = "linked_service_name"

  compression = {
    type  = "GZip"
    level = "Optimal"
  }

  format = {
    type        = "JsonFormat"
    filePattern = "setOfObjects"
 }

  path     = "path"
  filename = "filename"
}

References

Azure REST Api

taljundi commented 2 years ago

You could use azurerm_data_factory_dataset_delimited_text if you want

resource "azurerm_data_factory_dataset_delimited_text" "core" {
  name                = "example"
  data_factory_id     = azurerm_data_factory.core.id
  linked_service_name = azurerm_data_factory_linked_service_azure_blob_storage.core.name

  azure_blob_storage_location {
    container = azurerm_storage_container.population.name
    filename  = azurerm_storage_blob.source-file.name
  }

  compression_codec   = "gzip"
  compression_level   = "Optimal"
  column_delimiter    = "\\t"
  row_delimiter       = "NEW"
  encoding            = "UTF-8"
  quote_character     = "x"
  escape_character    = "f"
  first_row_as_header = true
  null_value          = "NULL"
}