Skip to main content

Arrow-mssql

PyPI

O que é o Arrow-mssql ?

É um projeto que recebe uma tabela ou consulta do SQL SERVER e faz a exportação para um arquivo .parquet ou .csv, utilizando a solução arrow que é uma tecnologia com foco em análise e desempenho na memória.

Também é possível importar um arquivo .parquet para uma tabela do sql server ou arquivo .csv.

Instalação

pip install arrow-mssql

Conexão

Para se conectar ao sql server o driver padrão é o pyodbc é preciso fornecedor uma string de conexao

somente a string de conexão é permitida

DRIVER = (
    'Driver={ODBC Driver 18 for Sql Server};'
    'Server=seu_servidor;'
    'Database=seu_banco_de_dados;'
    'TrustServerCertificate=Yes;'
    'Authentication=ActiveDirectoryIntegrated;'
)

Como usar ?

Tanto uma tabela ou consulta pode ser exportada

a exportacao é feita de forma incrimental por lotes de dados

# EXPORTANDO UMA TABELA -- para csv
to_csv(
    DRIVER, 
    'NOME_TABELA',
    schema='dbo',
    database='seu_banco', 
    path='destino.csv'
)

# EXPORTANDO UMA CONSULTA -- para .parquet
to_parquet(
    DRIVER, 
    'SELECT N1, N2 FROM NOME_TABELA WHERE N1 = 0', 
    schema='dbo',
    database='seu_banco', 
    path='destino.parquet'
)

É possivel importar arquivos csv ou parquet, definir um limite de linhas e colunas no processo.

# IMPORTAR .parquet para tabela temporaria do ssms
# o retornor é um cursor referente a conexao com o banco de dados
with write_parquet(
    DRIVER, 
    '##teste', 
    path='origem.parquet'
) as C:

    ...

# AGORA é possivel importar um numero limite de linhas
# e selecionar as colunas no arquivo parquet
with write_parquet(
    DRIVER, 
    '##teste', 
    path='origem.parquet',
    limit=100,
    columns=['col1', 'col2']
) as C:

    ...

Metadata

Release files for arrow-mssql 0.0.89

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arrow-mssql 0.0.89
File Size Uploaded Provenance
arrow_mssql-0.0.89.tar.gz 7.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for arrow-mssql 0.0.89
File Interpreter ABI Platform
arrow_mssql-0.0.89-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / arrow_mssql-0.0.89.tar.gz

Download URL arrow_mssql-0.0.89.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a304500fe8c3406f52fb59e4cddb8c68c3446e27dda7cdcd62dba2812e801582
BLAKE2b-256 checksum
How to use checksums
3a366a7134f6d889cea972e19187be636de8fc5eec2e155afd1b8c3632dc6c89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.9 Windows/10

Release files / arrow_mssql-0.0.89-py3-none-any.whl

Download URL arrow_mssql-0.0.89-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f36b7a8559f1d77c206d840755dd7c5a6b0c9905c0f8a5918fba0ce70844df13
BLAKE2b-256 checksum
How to use checksums
06b752fba542a39ae68a498cec8aabbafed8bafdf67bc99187dac1a29e9f997e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.9 Windows/10

Security for arrow-mssql 0.0.89

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page