Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the analytics CDK stack #481

Merged
merged 2 commits into from
Dec 5, 2023
Merged

Update the analytics CDK stack #481

merged 2 commits into from
Dec 5, 2023

Conversation

hawyar
Copy link
Contributor

@hawyar hawyar commented Dec 5, 2023

  • Removed the actions table as it is replaced by the events table. Let's keep the JSON Schema for now.
  • Appended the current version to the database name to make introspection easier for the analytics service.
  • Created an Athena WorkGroup to connect the S3 output bucket to the Glue database. We had the bucket before but it wasn't being used correctly.

@hawyar hawyar requested a review from shanejearley December 5, 2023 18:44
tags: [{ key: "version", value: config.dataVersion.toString() }],
})

this.workGroupName = workGroup.name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are you using the workGroupName?

Is it at all necessary to tie the work group to the glue database? Or this is just on the Athena side?

Copy link
Contributor Author

@hawyar hawyar Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right it is not needed I can match the workGroup with the output bucket.
If we don't tie them here with a workgroup then we have to update the location in the console manually.

},
"amount": {
"type": "string",
"type": "number",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you keeping all decimals, rounding, or keeping the original big int?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we are losing precision. I will store it as a string and let Athena handle casting CAST(amount AS DECIMAL(12, 4)). That would keep it precise and flexible.

@hawyar hawyar merged commit 35d8f6e into develop Dec 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants