简体   繁体   English

如何从 Athena 连接到 AWS EC2 实例上的 apache super-Set

[英]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..现在我按照 Superset 官方文档连接 Athena 和 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 )我已经制作了./docker/requirements-local.txt 并添加了一个驱动程序.. (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}&...' '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.如果您尝试以上述 url 格式注册 Athena,您将收到如上图所示的错误。

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 )我已经制作了./docker/requirements-local.txt 并添加了一个驱动程序.. (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}&...' '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.如果您尝试以上述 url 格式注册 Athena,您将收到如上图所示的错误。

please tell me how...请告诉我如何...

The JDBC driver would require Java which doesn't exist on your EC2 yet. JDBC 驱动程序需要 Java,它在您的 EC2 上尚不存在。

Have you tried with the rest interface?您是否尝试过 rest 接口?

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链接: https://docs.preset.io/docs/aws-athena

If the keys have special characters such as "/", then use URL encode eg "%2F" to escape it.如果按键有特殊字符,如“/”,则使用 URL 编码,例如“%2F”对其进行转义。 Note that you can use the IAM role on EC2, and skip the access key & secret key part.请注意,您可以在 EC2 上使用 IAM 角色,并跳过访问密钥和秘密密钥部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM