Skip to content

Commit 8dbdf5a

Browse files
committed
changes made according to the comments
1 parent 864edbc commit 8dbdf5a

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

src/SimpleReplay/replay.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -397,21 +397,15 @@ def save_query_stats(self, starttime, endtime, xid, query_idx):
397397
)
398398

399399
def get_tagged_sql(self, query_text, idx, transaction, connection):
400-
if g_config["source_tag"]:
400+
if g_config.get("source_tag", None):
401401
json_tags = {
402402
"xid": transaction.xid,
403403
"query_idx": idx,
404404
"replay_start": g_replay_timestamp.isoformat(),
405-
"source": g_config.get(["source_tag"]),
406-
}
407-
else:
408-
json_tags = {
409-
"xid": transaction.xid,
410-
"query_idx": idx,
411-
"replay_start": g_replay_timestamp.isoformat(),
412-
"source": "SimpleReplay",
405+
"source": g_config.get('source_tag', 'SimpleReplay'),
413406
}
414407

408+
415409
return "/* {} */ {}".format(json.dumps(json_tags), query_text)
416410

417411
def execute_transaction(self, transaction, connection):

src/SimpleReplay/replay.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ tag: ""
55
source_tag: ""
66

77
# Directory location of extracted workload, relative to current directory
8-
workload_location: "test-location/Edited_10_Extraction_devsaba-sr-test_2023-01-23T09:46:24.784062+00:00"
8+
workload_location: ""
99

1010
# Endpoint and username of target cluster to replay queries on
11-
target_cluster_endpoint: "replay-dev.254137219717.us-east-1.redshift-serverless.amazonaws.com:5439/dev"
12-
target_cluster_region: "us-east-1"
13-
master_username: "awsuser"
11+
target_cluster_endpoint: ""
12+
target_cluster_region: ""
13+
master_username: ""
1414
# NLB or NAT endpoint for Simple Replay to connect to. This NLB or NAT should have connectivity to target_cluster_endpoint
1515
nlb_nat_dns: ""
1616

@@ -35,26 +35,26 @@ time_interval_between_queries: ""
3535
execute_copy_statements: "false"
3636

3737
# Should UNLOAD statements be executed?
38-
execute_unload_statements: "true"
38+
execute_unload_statements: "false"
3939

4040
# Optional - Where the UNLOADs and system table unload goes.
41-
replay_output: "s3://simplereplay-v2.2.5-testing/test-drive-testing/provisioned/replay"
41+
replay_output: ""
4242

4343
# Optional - Where the analysis data and summary report will be uploaded. Example: s3://bucket_name/path
44-
analysis_output: "s3://simplereplay-v2.2.5-testing/test-drive-testing/provisioned"
44+
analysis_output: ""
4545

4646
# Optional - Leaving this blank means UNLOADs will not be replayed. IAM role for UNLOADs to be performed with.
47-
unload_iam_role: "arn:aws:iam::254137219717:role/RedshiftFullAccess"
47+
unload_iam_role: ""
4848

4949
# Optional - Leaving this blank means analysis will not be run. IAM role for analysis needs UNLOAD access.
50-
analysis_iam_role: "arn:aws:iam::254137219717:role/RedshiftFullAccess"
50+
analysis_iam_role: ""
5151

5252
# Location of the SQL file containing queries to unload system tables
5353
unload_system_table_queries: "unload_system_tables.sql"
5454

5555
# IAM role to UNLOAD system tables from source cluster to S3 location for later
5656
# analysis
57-
target_cluster_system_table_unload_iam_role: "arn:aws:iam::254137219717:role/RedshiftFullAccess"
57+
target_cluster_system_table_unload_iam_role: ""
5858

5959
# Include filters will work as "db AND user AND pid". Exclude filters will work as "db OR user OR pid".
6060
# In case of multiple values for any specific filter, please enclose each in single quotes

0 commit comments

Comments
 (0)