MyNixOS website logo
Description

'Palantir Foundry' Software Development Kit.

Interface to 'Palantir Foundry', including reading and writing structured or unstructured datasets, and more <https://www.palantir.com/platforms/foundry/>.

Palantir R SDK

License CRAN status Autorelease

Setup

Install the library from CRAN:

install.packages("foundry")

Alternatively, install the latest development version from Github:

install.packages("remotes")
remotes::install_github("https://github.com/palantir/palantir-r-sdk", ref = "0.13.0")

Configuration

Configuration for hostname and an authentication token can be provided using options:

  • foundry.hostname is the hostname of your instance e.g. example.palantirfoundry.com
  • foundry.token is a token acquired from the Tokens section of Foundry Settings

Alternatively, you can set the environment variables FOUNDRY_HOSTNAME and FOUNDRY_TOKEN.

Configuration will be loaded in the following order: options if present, otherwise environment variables.

Authentication tokens serve as a private password and allows a connection to Foundry data. Keep your token secret and do not share it with anyone else. Do not add a token to a source controlled or shared file.

Extra configuration options

  • foundry.config_dir is the directory where configuration files are stored, defaults to ~/.foundry
  • foundry.requests.timeout is the timeout of HTTPS requests made to Foundry, defaults to 150s

Aliases

To read datasets, aliases must first be registered. Create a YAML file called ~/.foundry/aliases.yml and define an alias for every dataset you wish to read or write to.

my_dataset:
    rid: ri.foundry.main.dataset.31388c03-2854-443e-b6cd-fe51c5908371
my_dataset_on_branch:
    rid: ri.foundry.main.dataset.5db9d133-6c87-4917-b11e-18b095ac4d30
    branch: develop

Examples

Read a tabular Foundry dataset into a data.frame or Apache Arrow Table

library(foundry)
df <- datasets.read_table("my_dataset")

Download raw files from a Dataset

all_dataset_files <- datasets.list_files("my_dataset")
downloaded_files <- datasets.download_files("my_dataset", all_dataset_files)

Write a data.frame or Apache Arrow Table to Foundry

datasets.write_table(df, "my_dataset")

Upload local files or folders to a Dataset

datasets.upload_files(file.path("~", "Downloads", "example"), "my_dataset")
Metadata

Version

0.13.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows