Skip to content

azurermStreamAnalyticsReferenceInputBlob

Manages a Stream Analytics Reference Input Blob. Reference data (also known as a lookup table) is a finite data set that is static or slowly changing in nature, used to perform a lookup or to correlate with your data stream. Learn more here.

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 azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
  this,
  "example_1",
  {
    account_replication_type: "LRS",
    account_tier: "Standard",
    location: azurermResourceGroupExample.location,
    name: "examplestoracc",
    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.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermStorageContainerExample =
  new azurerm.storageContainer.StorageContainer(this, "example_2", {
    container_access_type: "private",
    name: "example",
    storage_account_name: azurermStorageAccountExample.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.*/
azurermStorageContainerExample.overrideLogicalId("example");
const dataAzurermStreamAnalyticsJobExample =
  new azurerm.dataAzurermStreamAnalyticsJob.DataAzurermStreamAnalyticsJob(
    this,
    "example_3",
    {
      name: "example-job",
      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.*/
dataAzurermStreamAnalyticsJobExample.overrideLogicalId("example");
new azurerm.streamAnalyticsReferenceInputBlob.StreamAnalyticsReferenceInputBlob(
  this,
  "test",
  {
    date_format: "yyyy/MM/dd",
    name: "blob-reference-input",
    path_pattern: "some-random-pattern",
    resource_group_name: dataAzurermStreamAnalyticsJobExample.resourceGroupName,
    serialization: [
      {
        encoding: "UTF8",
        type: "Json",
      },
    ],
    storage_account_key: azurermStorageAccountExample.primaryAccessKey,
    storage_account_name: azurermStorageAccountExample.name,
    storage_container_name: azurermStorageContainerExample.name,
    stream_analytics_job_name: dataAzurermStreamAnalyticsJobExample.name,
    time_format: "HH",
  }
);

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the Reference Input Blob. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.

  • streamAnalyticsJobName - (Required) The name of the Stream Analytics Job. Changing this forces a new resource to be created.

  • dateFormat - (Required) The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.

  • pathPattern - (Required) The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.

  • storageAccountName - (Required) The name of the Storage Account that has the blob container with reference data.

  • storageAccountKey - (Optional) The Access Key which should be used to connect to this Storage Account. Required if authenticationMode is connectionString.

  • storageContainerName - (Required) The name of the Container within the Storage Account.

  • timeFormat - (Required) The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.

  • authenticationMode - (Optional) The authentication mode for the Stream Analytics Reference Input. Possible values are msi and connectionString. Defaults to connectionString.

  • serialization - (Required) A serialization block as defined below.


A serialization block supports the following:

  • type - (Required) The serialization format used for the reference data. Possible values are avro, csv and json.

  • encoding - (Optional) The encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. It currently can only be set to utf8.

-> NOTE: This is required when type is set to csv or json.

  • fieldDelimiter - (Optional) The delimiter that will be used to separate comma-separated value (CSV) records. Possible values are (space), `,` (comma), (tab), | (pipe) and ;.

-> NOTE: This is required when type is set to csv.

Attributes Reference

The following attributes are exported in addition to the arguments listed above:

  • id - The ID of the Stream Analytics Reference Input Blob.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Stream Analytics Reference Input Blob.
  • update - (Defaults to 30 minutes) Used when updating the Stream Analytics Reference Input Blob.
  • read - (Defaults to 5 minutes) Used when retrieving the Stream Analytics Reference Input Blob.
  • delete - (Defaults to 30 minutes) Used when deleting the Stream Analytics Reference Input Blob.

Import

Stream Analytics Reference Input Blob's can be imported using the resourceId, e.g.

terraform import azurerm_stream_analytics_reference_input_blob.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/inputs/input1