-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added quicksight sms usage dataset with fixed date data type as string (
#1201) * Revert "Quicksight: Added SMS usage report as a data set (#1193)" This reverts commit f4dbd4d. * Added quicksight sms usage dataset with fixed date data type as string * Converted all remaining columns that were not STRING to STRING.
- Loading branch information
1 parent
e16e1a3
commit 092107d
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# valid column types are [STRING INTEGER DECIMAL DATETIME BIT BOOLEAN JSON] | ||
|
||
resource "aws_quicksight_data_set" "sms_usage" { | ||
data_set_id = "sms_usage" | ||
name = "SmsUsage" | ||
import_mode = "SPICE" | ||
|
||
physical_table_map { | ||
physical_table_map_id = "smsusage" | ||
|
||
s3_source { | ||
data_source_arn = aws_quicksight_data_source.s3_sms_usage.arn | ||
|
||
upload_settings { | ||
contains_header = "true" | ||
delimiter = "," | ||
format = "CSV" | ||
} | ||
|
||
input_columns { | ||
name = "PublishTimeUTC" | ||
type = "STRING" | ||
} | ||
input_columns { | ||
name = "MessageId" | ||
type = "STRING" | ||
} | ||
input_columns { | ||
name = "MessageType" | ||
type = "STRING" | ||
} | ||
input_columns { | ||
name = "DeliveryStatus" | ||
type = "STRING" | ||
} | ||
input_columns { | ||
name = "PriceInUSD" | ||
type = "STRING" | ||
} | ||
input_columns { | ||
name = "PartNumber" | ||
type = "STRING" | ||
} | ||
input_columns { | ||
name = "TotalParts" | ||
type = "STRING" | ||
} | ||
} | ||
} | ||
|
||
permissions { | ||
actions = local.dataset_viewer_permissions | ||
principal = aws_quicksight_group.dataset_viewer.arn | ||
} | ||
permissions { | ||
actions = local.dataset_owner_permissions | ||
principal = aws_quicksight_group.dataset_owner.arn | ||
} | ||
} | ||
|
||
resource "aws_quicksight_refresh_schedule" "sms_usage" { | ||
data_set_id = "sms_usage" | ||
schedule_id = "schedule-sms-usage" | ||
depends_on = [aws_quicksight_data_set.sms_usage] | ||
|
||
schedule { | ||
refresh_type = "INCREMENTAL_REFRESH" | ||
|
||
# SMS usage reports are generated around 01:00 UTC. | ||
schedule_frequency { | ||
interval = "DAILY" | ||
time_of_the_day = "02:30" | ||
} | ||
} | ||
} |