Created
February 18, 2021 04:38
-
-
Save orcaman/c5184a99b06fc776b48e147d4c483242 to your computer and use it in GitHub Desktop.
get_composite_keys_no_cache.py
This file contains hidden or 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
def get_composite_keys(table_name: str, with_env=True) -> list: | |
composite_keys = list() | |
desc = dynamodb_client.describe_table(TableName=table_name) | |
key_schema = desc['Table']['KeySchema'] | |
for k in key_schema: | |
if '#' in k['AttributeName']: | |
composite_keys.append(k['AttributeName']) | |
return composite_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment