R package for interfacing with Azure table storage
Перейти к файлу
Hong Ooi 72a50bd568 bump to dev version 2021-01-13 06:37:19 +11:00
.github/workflows add Github Action workflow 2020-10-22 11:56:28 +11:00
R tweak insert/update 2020-10-23 11:26:22 +11:00
man Retry on 429 error (#1) 2020-10-23 08:20:23 +11:00
tests Retry on 429 error (#1) 2020-10-23 08:20:23 +11:00
vignettes add vignette 2020-10-23 03:30:21 +11:00
.Rbuildignore use batch_transaction object 2020-10-22 11:31:14 +11:00
.gitignore Initial commit 2020-10-21 13:47:03 +00:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2020-10-21 06:47:10 -07:00
CONTRIBUTING.md transfer from AzureCosmosR 2020-10-22 00:58:47 +11:00
DESCRIPTION bump to dev version 2021-01-13 06:37:19 +11:00
LICENSE transfer from AzureCosmosR 2020-10-22 00:58:47 +11:00
LICENSE.md transfer from AzureCosmosR 2020-10-22 00:58:47 +11:00
NAMESPACE azure_table -> storage_table 2020-10-23 00:04:00 +11:00
README.md azure_table -> storage_table 2020-10-23 00:04:00 +11:00
SECURITY.md Initial SECURITY.md commit 2020-10-21 06:47:12 -07:00

README.md

AzureTableStor

CRAN Downloads R-CMD-check

An R interface to the Azure table storage service, building on the functionality provided by AzureStor.

Table storage is excellent for flexible datasets—web app user data, address books, device information, and other metadata—and lets you build cloud applications without locking down the data model to particular schemas. Because different rows in the same table can have a different structure—for example, order information in one row, and customer information in another—you can evolve your application and table schema without taking it offline. The table storage service is available both as part of general Azure storage, and as an optional API in Azure Cosmos DB.

The primary repo for this package is at https://github.com/Azure/AzureTableStor; please submit issues and PRs there. It is also mirrored at the Cloudyr org at https://github.com/cloudyr/AzureTableStor. You can install the development version of the package with devtools::install_github("Azure/AzureTableStor").

Example

library(AzureTableStor)

# storage account endpoint
endp <- table_endpoint("https://mystorageacct.table.core.windows.net", key="mykey")
# Cosmos DB w/table API endpoint
endp <- table_endpoint("https://mycosmosdb.table.cosmos.azure.com:443", key="mykey")

create_storage_table(endp, "mytable")
list_storage_tables(endp)
tab <- storage_table(endp, "mytable")

insert_table_entity(tab, list(
    RowKey="row1",
    PartitionKey="partition1",
    firstname="Bill",
    lastname="Gates"
))

get_table_entity(tab, "row1", "partition1")

# specifying the entity as JSON text instead of a list
update_table_entity(tab,
'{
    "RowKey": "row1",
    "PartitionKey": "partition1",
    "firstname": "Satya",
    "lastname": "Nadella
}')

# we can import to the same table as above: table storage doesn't enforce a schema
import_table_entities(tab, mtcars,
    row_key=row.names(mtcars),
    partition_key=as.character(mtcars$cyl))

list_table_entities(tab)
list_table_entities(tab, filter="firstname eq 'Satya'")
list_table_entities(tab, filter="RowKey eq 'Toyota Corolla'")