Python with Boto3
Examples
Get a list of all users
import pandas as pd
import boto3
S3_BUCKET_NAME = "<your bucket name here>"
# Create client, authentication is done through environment variables
s3_client = boto3.client('s3')
# Utility method to get a file and load it into a df
def getDataFrameFromS3(table):
key = f'latest/{table}.csv'
response = s3_client.get_object(Bucket=S3_BUCKET_NAME, Key=key)
return pd.read_csv(response['Body'])
# Get the dimension CSV file that contains all users
dim_user = getDataFrameFromS3('dim_user')
print(dim_user)Time spent in Learn per technology
More examples?
Last updated