snowflakedb / SnowAlert

Security Analytics Using The Snowflake Data Warehouse
Apache License 2.0
184 stars 57 forks source link

update aws_query_pack to match GRANT statement #461

Closed asproul closed 4 years ago

asproul commented 4 years ago
sfc-gh-afedorov commented 4 years ago

Thanks for the PR. Could you please expound on what you mean by —

remove cloudtrail.deployment as it is not referenced in aws_cloudtrail.py when creating new tables.

It can be referenced by some other piece of infra that is built on top of it.

asproul commented 4 years ago

Thanks for the PR. Could you please expound on what you mean by —

remove cloudtrail.deployment as it is not referenced in aws_cloudtrail.py when creating new tables.

It can be referenced by some other piece of infra that is built on top of it.

I could be misunderstanding the "cloudtrail.deployment" construct but, I did not see a "deployment" column for the landing table created by aws_cloudtrail.py. When I tried to create the view and run the query as-is in the snowflake worksheet from a newly created landing table using SnowAlert's connector for cloudtrail, the query produced an error stating that "cloudtrail.deployment" did not exist or something to that effect. When searching through this repository, I did not find any references to deployment except the hits in the "aws_cloudtrail.py" file. I thought that "cloudtrail.deployment" might have been a column in an older version of the landing table so I had removed it in my case.

asproul commented 4 years ago

@sfc-gh-afedorov - added cloudtrail.deployment back to the file. How's this change looking now?