Pinned Loading
-
Pyathena + pandas
Pyathena + pandas 1from pyathena import connect
2import pandas as pd
3conn = connect(region_name='us-west-2', work_group='my-workgroup', s3_staging_dir='s3://bucket')
4df = pd.read_sql("""SELECT * FROM "db"."table";""", conn)
-
Boto3 - Start a batch job
Boto3 - Start a batch job 1import boto3
23def run_batch_job_submit(job_name, job_definition, job_queue):
4try:
5batch = boto3.client(service_name='batch')
-
Add a parquet file to athena
Add a parquet file to athena 1from pyathena import connect
23def add_table_to_athena(path, db, table, work_group, columns_schema, staging_dir, region_name):
4# The LOCATION has to end with / or then the sub-parquet files will not be found and the table will not be created.
5query = f"""CREATE EXTERNAL TABLE IF NOT EXISTS `{db}`.`{table}` ({columns_schema})
-
How to "change" a DynamoDB table name
How to "change" a DynamoDB table name 1Overall you will create a restoration point, create a new table from this restoration point, then delete the old table.
231. Select the table you for which you would like to change the name.
42. Go to backup tab
53. Create an On demand backup.
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.