Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating readme #31

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading