Skip to content

Commit

Permalink
Make database name and table names parameters in the timestream function
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrous committed Aug 7, 2023
1 parent abd8ee5 commit 921a659
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdc_aws_utils/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ def upload_file_to_s3(s3_client: str, filename: str, destination_bucket: str, fi

def log_to_timestream(
timestream_client: type,
database_name: str,
table_name: str,
action_type: str,
file_key: str,
new_file_key: str = None,
Expand Down Expand Up @@ -201,8 +203,8 @@ def log_to_timestream(

# Write to Timestream
timestream_client.write_records(
DatabaseName="sdc_aws_logs",
TableName="sdc_aws_s3_bucket_log_table",
DatabaseName=database_name,
TableName=table_name,
Records=[
{
"Time": CURRENT_TIME,
Expand Down

0 comments on commit 921a659

Please sign in to comment.