Skip to content

aws.iotfleetwise.get_campaign

Example SQL Queries

SELECT * FROM
aws.iotfleetwise.get_campaign
WHERE
"name" = 'VALUE';

Description

Retrieves information about a campaign.

Table Definition

Column NameColumn Data Type
name Required Input Column

The name of the campaign.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
arn

The Amazon Resource Name (ARN) of the campaign.

VARCHAR
collection_scheme

Information about the data collection scheme associated with the campaign.

STRUCT(
"time_based_collection_scheme" STRUCT(
"period_ms" BIGINT
),
"condition_based_collection_scheme" STRUCT(
"expression" VARCHAR,
"minimum_trigger_interval_ms" BIGINT,
"trigger_mode" VARCHAR,
"condition_language_version" BIGINT
)
)
Show child fields
collection_scheme.condition_based_collection_scheme

Information about a collection scheme that uses a simple logical expression to recognize what data to collect.

Show child fields
collection_scheme.condition_based_collection_scheme.condition_language_version

Specifies the version of the conditional expression language.

collection_scheme.condition_based_collection_scheme.expression

The logical expression used to recognize what data to collect. For example, $variable.`Vehicle.OutsideAirTemperature` >= 105.0.

collection_scheme.condition_based_collection_scheme.minimum_trigger_interval_ms

The minimum duration of time between two triggering events to collect data, in milliseconds.

If a signal changes often, you might want to collect data at a slower rate.

collection_scheme.condition_based_collection_scheme.trigger_mode

Whether to collect data for all triggering events (ALWAYS). Specify (RISING_EDGE), or specify only when the condition first evaluates to false. For example, triggering on "AirbagDeployed"; Users aren't interested on triggering when the airbag is already exploded; they only care about the change from not deployed => deployed.

collection_scheme.time_based_collection_scheme

Information about a collection scheme that uses a time period to decide how often to collect data.

Show child fields
collection_scheme.time_based_collection_scheme.period_ms

The time period (in milliseconds) to decide how often to collect data. For example, if the time period is 60000, the Edge Agent software collects data once every minute.

compression

Whether to compress signals before transmitting data to Amazon Web Services IoT FleetWise. If OFF is specified, the signals aren't compressed. If it's not specified, SNAPPY is used.

VARCHAR
creation_time

The time the campaign was created in seconds since epoch (January 1, 1970 at midnight UTC time).

TIMESTAMP_S
data_destination_configs

The destination where the campaign sends data. You can choose to send data to be stored in Amazon S3 or Amazon Timestream.

Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics.

You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.

STRUCT(
"s3_config" STRUCT(
"bucket_arn" VARCHAR,
"data_format" VARCHAR,
"storage_compression_format" VARCHAR,
"prefix" VARCHAR
),
"timestream_config" STRUCT(
"timestream_table_arn" VARCHAR,
"execution_role_arn" VARCHAR
)
)[]
Show child fields
data_destination_configs[]
Show child fields
data_destination_configs[].s3_config

The Amazon S3 bucket where the Amazon Web Services IoT FleetWise campaign sends data.

Show child fields
data_destination_configs[].s3_config.bucket_arn

The Amazon Resource Name (ARN) of the Amazon S3 bucket.

data_destination_configs[].s3_config.data_format

Specify the format that files are saved in the Amazon S3 bucket. You can save files in an Apache Parquet or JSON format.

  • Parquet - Store data in a columnar storage file format. Parquet is optimal for fast data retrieval and can reduce costs. This option is selected by default.

  • JSON - Store data in a standard text-based JSON file format.

data_destination_configs[].s3_config.prefix

(Optional) Enter an S3 bucket prefix. The prefix is the string of characters after the bucket name and before the object name. You can use the prefix to organize data stored in Amazon S3 buckets. For more information, see Organizing objects using prefixes in the Amazon Simple Storage Service User Guide.

By default, Amazon Web Services IoT FleetWise sets the prefix processed-data/year=YY/month=MM/date=DD/hour=HH/ (in UTC) to data it delivers to Amazon S3. You can enter a prefix to append it to this default prefix. For example, if you enter the prefix vehicles, the prefix will be vehicles/processed-data/year=YY/month=MM/date=DD/hour=HH/.

data_destination_configs[].s3_config.storage_compression_format

By default, stored data is compressed as a .gzip file. Compressed files have a reduced file size, which can optimize the cost of data storage.

data_destination_configs[].timestream_config

The Amazon Timestream table where the campaign sends data.

Show child fields
data_destination_configs[].timestream_config.execution_role_arn

The Amazon Resource Name (ARN) of the task execution role that grants Amazon Web Services IoT FleetWise permission to deliver data to the Amazon Timestream table.

data_destination_configs[].timestream_config.timestream_table_arn

The Amazon Resource Name (ARN) of the Amazon Timestream table.

data_extra_dimensions

A list of vehicle attributes associated with the campaign.

VARCHAR[]
Show child fields
data_extra_dimensions[]
description

The description of the campaign.

VARCHAR
diagnostics_mode

Option for a vehicle to send diagnostic trouble codes to Amazon Web Services IoT FleetWise.

VARCHAR
expiry_time

The time the campaign expires, in seconds since epoch (January 1, 1970 at midnight UTC time). Vehicle data won't be collected after the campaign expires.

TIMESTAMP_S
last_modification_time

The last time the campaign was modified.

TIMESTAMP_S
post_trigger_collection_duration

How long (in seconds) to collect raw data after a triggering event initiates the collection.

BIGINT
priority

A number indicating the priority of one campaign over another campaign for a certain vehicle or fleet. A campaign with the lowest value is deployed to vehicles before any other campaigns.

BIGINT
signal_catalog_arn

The ARN of a signal catalog.

VARCHAR
signals_to_collect

Information about a list of signals to collect data on.

STRUCT(
"name" VARCHAR,
"max_sample_count" BIGINT,
"minimum_sampling_interval_ms" BIGINT
)[]
Show child fields
signals_to_collect[]
Show child fields
signals_to_collect[].max_sample_count

The maximum number of samples to collect.

signals_to_collect[].minimum_sampling_interval_ms

The minimum duration of time (in milliseconds) between two triggering events to collect data.

If a signal changes often, you might want to collect data at a slower rate.

signals_to_collect[].name

The name of the signal.

spooling_mode

Whether to store collected data after a vehicle lost a connection with the cloud. After a connection is re-established, the data is automatically forwarded to Amazon Web Services IoT FleetWise.

VARCHAR
start_time

The time, in milliseconds, to deliver a campaign after it was approved.

TIMESTAMP_S
status

The state of the campaign. The status can be one of: CREATING, WAITING_FOR_APPROVAL, RUNNING, and SUSPENDED.

VARCHAR
target_arn

The ARN of the vehicle or the fleet targeted by the campaign.

VARCHAR