GithubHelp home page GithubHelp logo

pyarrow_to_db2's Introduction

pyarrow_to_db2

ibm_db extension to load a pyarrow table to db2 Initially named spclient_python but in the future the 'official' name could change. sp for store procedure, client it was a client library not running on db2 backend, python as it was a python library.

To run it, go to cextensions
You need pyarrow installed
pip3 install pyarrow
pip3 install numpy
pip3 install pybind11

python3 setup.py build
also 
cmake CMakeLists.txt
make
cd ..
python3 hello_parquet.py

hello_parquet.ini contains the connection credentials.

The function to focus is spclient_python.arrow_table_to_db2 below is the docstring.

arrow_table_to_db2 (conn, log_result, DataBufferSize, Savecount, ChunkSize, log, table, tablespace_name, schema_name, table_name, column_oriented, drop_table)

    Parameters
    ----------
    conn             : :class:`ibm_db.IBM_DBConnection` connection object
    log_result       : :obj:`str` log result filename
    DataBufferSize   : :obj:`int  data buffer size`, this could be zero
    Savecount        : :obj:`int` save count, this could be zero
    ChunkSize        : :obj:`int` chunk size
    log              : :func:`log.info` logging info function
    table            : :class:`pyarrow.lib.Table` pyarrow table object
    tablespace_name  : :obj:`str` Table space name
    schema_name      : :obj:`str` Schema name
    table_name       : :obj:`str` Table name
    column_oriented  : :obj:`bool` True or False column oriented table ?
    drop_table       : :obj:`bool` True or False drop the table before inserting ?

pyarrow_to_db2's People

Contributors

asierra01 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.