bcpy | Python Wrapper for Microsoft SQL Server bcp Utility | SQL Database library

 by   titan550 Python Version: 0.1.8 License: MIT

kandi X-RAY | bcpy Summary

kandi X-RAY | bcpy Summary

bcpy is a Python library typically used in Manufacturing, Utilities, Energy, Utilities, Database, SQL Database applications. bcpy has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install bcpy' or download it from GitHub, PyPI.

This package is a wrapper for Microsoft's SQL Server bcp utility. Current database drivers available in Python are not fast enough for transferring millions of records (yes, I have tried pyodbc fast_execute_many). Despite the IO hits, the fastest option by far is saving the data to a CSV file in file system (preferably /dev/shm tmpfs) and using the bcp utility to transfer the CSV file to SQL Server.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              bcpy has a low active ecosystem.
              It has 23 star(s) with 10 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 6 open issues and 9 have been closed. On average issues are closed in 75 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of bcpy is 0.1.8

            kandi-Quality Quality

              bcpy has 0 bugs and 4 code smells.

            kandi-Security Security

              bcpy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              bcpy code analysis shows 0 unresolved vulnerabilities.
              There are 2 security hotspots that need review.

            kandi-License License

              bcpy is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              bcpy releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              bcpy saves you 152 person hours of effort in developing the same functionality from scratch.
              It has 378 lines of code, 32 functions and 11 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed bcpy and discovered the below as its top functions. This is intended to give you an instant insight into bcpy implemented functionality, and help decide if they suit your requirements.
            • Writes the contents of the file to the database
            • Run a SQL command on a given server
            • Bcp command line tool
            • Get the format file
            • Returns a list of field terminators
            • Generates SQL statement to create table
            • Build the format file
            • Compute the sha512 hash of text
            • Scatter a string
            • Set the columns
            • Read the columns from the file
            Get all kandi verified functions for this library.

            bcpy Key Features

            No Key Features are available at this moment for bcpy.

            bcpy Examples and Code Snippets

            bcpy,Examples,DataFrame
            Pythondot img1Lines of Code : 17dot img1License : Permissive (MIT)
            copy iconCopy
            import bcpy
            import numpy as np
            import pandas as pd
            
            
            sql_config = {
                'server': 'sql_server_hostname',
                'database': 'database_name',
                'username': 'test_user',
                'password': 'test_user_password1234'
            }
            table_name = 'test_dataframe'
            df = pd.Da  
            bcpy,Examples,Flat File
            Pythondot img2Lines of Code : 14dot img2License : Permissive (MIT)
            copy iconCopy
            import bcpy
            
            
            sql_config = {
                'server': 'sql_server_hostname',
                'database': 'database_name',
                'username': 'test_user',
                'password': 'test_user_password1234'
            }
            sql_table_name = 'test_data1'
            csv_file_path = 'tests/data1.csv'
            flat_file = bcp  
            bcpy,How Can I Install It?
            Pythondot img3Lines of Code : 1dot img3License : Permissive (MIT)
            copy iconCopy
            pip install bcpy
              

            Community Discussions

            QUESTION

            Problem trying to upload CSV to Database using bcp in Python
            Asked 2020-Apr-30 at 15:09

            I am having a problem trying to upload a CSV file to a Azure MS SQL database through bcp.

            I am using the Bcpy tool to achieve this.

            This is the script I am running:

            ...

            ANSWER

            Answered 2020-Apr-30 at 15:09

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install bcpy

            You can install using 'pip install bcpy' or download it from GitHub, PyPI.
            You can use bcpy like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install bcpy

          • CLONE
          • HTTPS

            https://github.com/titan550/bcpy.git

          • CLI

            gh repo clone titan550/bcpy

          • sshUrl

            git@github.com:titan550/bcpy.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link