Skip to content

Commit

Permalink
Merge pull request #31 from tomroh/devel
Browse files Browse the repository at this point in the history
updating readme
  • Loading branch information
tomroh authored Jul 10, 2024
2 parents 70b2a98 + e3057c8 commit cf4d4a4
Show file tree
Hide file tree
Showing 24 changed files with 98 additions and 873 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bcputility
Type: Package
Title: Wrapper for SQL Server bcp Utility
Version: 0.4.3
Version: 0.4.4
Authors@R: person("Thomas", "Roh", email = "[email protected]", role = c("aut", "cre"))
Description: Provides functions to utilize a command line utility that does bulk inserts and exports from SQL Server databases.
License: MIT + file LICENSE
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# bcputility 0.4.4

* Updated readme to clarify dependencies and provide quick start examples.

# bcputility 0.4.3

* An error is now thrown for cases where a projection has an EPSG that is `NA`.
Expand Down
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bcputility <a href='https://bcputility.roh.engineering'><img src='man/figures/logo.png' align="right" height="104" /></a>
# bcputility <a href='https://bcputility.delveds.com'><img src='man/figures/logo.png' align="right" height="104" /></a>

<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/bcputility)](https://CRAN.R-project.org/package=bcputility)
Expand All @@ -20,6 +20,11 @@ improves performance of large writes by using bulk inserts.
An export function is provided for convenience, but likely will not significantly
improve performance over other methods.

## Prerequisites

The system dependencies can be downloaded and installed from
[Microsoft](https://learn.microsoft.com/en-us/sql/tools/bcp-utility#download-the-latest-version-of-the-bcp-utility).
It is recommended to add `bcp` and `sqlcmd` to the system path.

## Installation

Expand All @@ -36,13 +41,38 @@ Install the development version with:
devtools::install_github("tomroh/bcputility")
```

If *bcp* and *sqlcmd* is not on the system path or you want to override the default, set the option with the full file path:
To check if the prerequisite binaries are on the path:

```r
bcpVersion()
sqlcmdVersion()
```

If `bcp` and `sqlcmd` is not on the system path or you want to override the default, set the option with the full file path:

```r
options(bcputility.bcp.path = "<path-to-bcp>")
options(bcputility.sqlcmd.path = "<path-to-sqlcmd>")
```

## Usage

Trusted Connection (default):

```r
x <- read.csv("<file.csv>")
connectArgs <- makeConnectArgs(server = "<server>", database = "<database>")
bcpImport(x = x, connectargs = connectArgs, table = "<table>")
```

SQL Authentication:

```r
connectArgs <- makeConnectArgs(server = "<server>", database = "<database>",
username = "<username>", password = "<password>")
bcpImport(x = x, connectargs = connectArgs, table = table)
```

## Benchmarks

Benchmarks were performed with a local installation of SQL Server Express.
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 0 additions & 60 deletions docs/bootstrap-toc.css

This file was deleted.

159 changes: 0 additions & 159 deletions docs/bootstrap-toc.js

This file was deleted.

Loading

0 comments on commit cf4d4a4

Please sign in to comment.