Skip to main content

Athena-mvsh é um biblioteca python, que interage com o serviço Amazon Athena

Project description

Athena-mvsh

PyPI

O que é o Athena-mvsh ?

Athena-mvsh é um biblioteca python, que interage com o serviço Amazon Athena, que é um serviço de consulta interativa que permite usar SQL para analisar dados diretamente no Amazon S3.

Algumas regras da DB API 2.0 (PEP 249) são implementadas.

Instalação

pip install athena-mvsh

Credenciais

Para se conectar é preciso informar o aws_access_key_id, aws_secret_access_key o local de saida das consultas s3_staging_dir e a regiao do bucket region_name. Se você usar o arquivo de perfil padrão, não será necessário informar as credenciais.

from athena_mvsh import (
    Athena,
    CursorPython
)

cursor = CursorPython(
    s3_staging_dir='s3:/caminho-saida-consulta/',
    aws_access_key_id='KEY_ID',
    aws_secret_access_key='SECRET_KEY',
    region_name='us-east-1'
)

with Athena(cursor=cursor) as cliente:
    cliente.execute("SELECT 1")
    rst = cliente.fetchone()

Como usar ?

Esta biblioteca Python facilita a consulta ao Amazon Athena, oferecendo suporte para três tipos de cursores: Python, Parquet e DuckDB. Com esta biblioteca, você pode executar consultas SQL no Amazon Athena e obter os resultados no formato desejado de maneira fácil e eficiente.

Funcionalidades Consulta ao Amazon Athena: Execute consultas SQL no Amazon Athena.

Cursores Diversos:

  • CursorPython: Retorna os resultados da consulta como objetos Python.
  • CursorParquet: Retorna os resultados da consulta no formato Parquet.
  • CursorParquetDuckdb: Retorna os resultados da consulta integrados ao DuckDB.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

athena_mvsh-0.0.7.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

athena_mvsh-0.0.7-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file athena_mvsh-0.0.7.tar.gz.

File metadata

  • Download URL: athena_mvsh-0.0.7.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.7 Windows/10

File hashes

Hashes for athena_mvsh-0.0.7.tar.gz
Algorithm Hash digest
SHA256 bcdd036c62cea58a07610537c254dc489ab1c0d5c6b91c61c910ea1df662e2cd
MD5 140ed8ba054cfd295370e4608677c278
BLAKE2b-256 af3fb9a011b58080f2297f46ae647a9a22e914b3faf92e79c4708bec326ce4ee

See more details on using hashes here.

File details

Details for the file athena_mvsh-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: athena_mvsh-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.7 Windows/10

File hashes

Hashes for athena_mvsh-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd1fdaed1eac1947cb148023b9c3a919b870b3bb56baa335f2f162dbf3726d8
MD5 62c4ce9612679484978cd58e3dde642f
BLAKE2b-256 ed4d9ac1906269481a9c662df64f1c6a5a2a1308a20f619eb039f2be442b8d98

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page