'How to connect From Athena to apache super-Set on AWS EC2 instance

Now i following the Superset official document for connect Athena and apache-Superset..

I already made ./docker/requirements-local.txt and add a driver.. (echo "PyAthenaJDBC>1.0.9" >> ./docker/requirements-local.txt & echo "PyAthena>1.2.0" >> ./docker/requirements-local.txt )

But it was not working...

'awsathena+jdbc://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{schema_name}?s3_staging_dir={s3_staging_dir}&...'

If you try to register Athena in the above url format, you will get an error like the picture above.

please tell me how...

I already made ./docker/requirements-local.txt and add a driver.. (echo "PyAthenaJDBC>1.0.9" >> ./docker/requirements-local.txt & echo "PyAthena>1.2.0" >> ./docker/requirements-local.txt )

But it was not working...

enter image description here

'awsathena+jdbc://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{schema_name}?s3_staging_dir={s3_staging_dir}&...'

If you try to register Athena in the above url format, you will get an error like the picture above.

please tell me how...



Solution 1:[1]

The JDBC driver would require Java which doesn't exist on your EC2 yet.

Have you tried with the rest interface?

awsathena+rest://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{schema_name}?s3_staging_dir={s3_staging_dir}&...

Link: https://docs.preset.io/docs/aws-athena

If the keys have special characters such as "/", then use URL encode e.g. "%2F" to escape it. Note that you can use the IAM role on EC2, and skip the access key & secret key part.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Liem Pham