question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for VACUUM - Iceberg

See original GitHub issue

What

With the introduction of Iceberg a new vacuum operation was added, but when trying to run with pyathena I run in this issue:

pyathena.error.DatabaseError: An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: line 1:1: mismatched input 'VACUUM'. Expecting: 'ALTER', 'ANALYZE', 'CALL', 'COMMIT', 'CREATE', 'DEALLOCATE', 'DELETE', 'DESC', 'DESCRIBE', 'DROP', 'EXECUTE', 'EXPLAIN', 'GRANT', 'INSERT', 'PREPARE', 'RESET', 'REVOKE', 'ROLLBACK', 'SET', 'SHOW', 'START', 'UNLOAD', 'UPDATE', 'USE', <query>

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nicor88commented, Nov 24, 2022

Closing this one, as fixed by this and not realated to pyathena at all.

1reaction
nicor88commented, Nov 24, 2022

@laughingman7743 I’m using an explicit workgroup with v3, and then I’m using the latest boto3 apis. Somehow If I run this

import boto3

client = boto3.client('athena')


response = client.start_query_execution(
    QueryString='VACCUM silver.iceberg_increment',
    WorkGroup='athena_v3',
)

all works, same if I run this

cursor = connect(
    work_group='athena_v3',
    s3_staging_dir="s3://tmp-datalake-dev-901621332207-eu-central-1/py_athena/",).cursor()
data = cursor.execute("vacuum silver.iceberg_increment")
print(cursor)

Most likely might be on dbt-athena, but still didn’t find the issue…as it uses cursor.execute as specified above and works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VACUUM - Amazon Athena - AWS Documentation
The VACUUM statement performs table maintenance on Apache Iceberg tables by removing no longer needed data files. ... VACUUM is transactional and is...
Read more >
Apache Iceberg
Iceberg supports flexible SQL commands to merge new data, update existing rows, and perform targeted deletes. Iceberg can eagerly rewrite data files for ......
Read more >
Iceberg connector — Trino 403 Documentation
The connector supports two Iceberg catalog types, you may use either a Hive metastore service (HMS) or AWS Glue. The catalog type is...
Read more >
Can You Vacuum Seal Lettuce? | FoodVacBags.com
To keep from crushing it during the sealing process, we recommend sealing lettuce in vacuum canisters. Carey canisters are available in two ...
Read more >
Implement Iceberg routine for removing orphaned files #10623
findepi commented on Jan 15 ... This is sometimes called "vacuum". All reactions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found