Saltar al contenido principal
waffle.svg
Domo

DomoR Usage

Version 1

 

Important: When referencing this page outside of Knowledge Base, use this link: http://knowledge.domo.com?cid=domorusage

Intro

This topic lists and describes a number of DomoR commands available from the R command line.

Training Video - DomoR Plugin Overview

 

 

Note: The product training videos are for Domo customers and clients only.

Help

To open the embedded help file, enter the following command:

help(package=DomoR)

List

To open a list of all your DataSets, enter the following command:

DomoR::list_ds()

The returned list will look something like the following:

Index

ID

dataProviderType

Name

1

a02f0cdf-d1a4-4d75-9729-8135e499a8d9

twitter

User Profile Metrics

2

87703789-3778-4882-ad9a-00514fd55e5b

Instagram

Recent Media Likes

3

014cfa9c-7aa3-4b24-acaf-f90c768542d9

google-analytics

Campaign Metrics

4

48d49aa4-6e03-451a-906b-2aa6610dbd55

Mysql

Customers

The ID can be used to explicitly fetch a data source. For convenience, the Index number can also be used to reference a data source. Be careful using the Index number, as it always fetches the data source from the most recent listing. For more information, see the next section.

Tip: If you want to look up the ID of a specific DataSet in Domo, open the details view for the DataSet you want to identify in the Data Center. The ID is displayed in the URL. 

You can also provide various arguments to narrow the results. For more examples, use this command to access the DomoR documentation:

?list_ds()

Fetch

Fetch a data source using the Index number from the list obtained using list_ds().

df <- DomoR::fetch(1)

Or specify an ID directly.

df <- DomoR::fetch('48d49aa4-6e03-451a-906b-2aa6610dbd55')

Make sure to assign the fetched data source to a data frame variable so you can manipulate the data. If you don't specify a variable to assign it to, the data source is output to the console.

Create

Create a data source by passing in a data frame with a name and description, where df is your data frame variable from which you'll create a data source in Domo.

DomoR::create(df, name=" Dataset Name", description="Dataset Description")

Replace

Replace an existing data source and update the schema if necessary.

DomoR::replace_ds('ab84f24a-73d4-0188-d8aa-8fe78103a721', df)

A warning will appear on the console if the schema is changed. 

Note: The DomoR plugin will not prevent you from replacing an existing data source that has a different schema. It will only warn you that it happened. Be careful when replacing DataSets as there is no way to undo this.

For additional details use this command to access the DomoR documentation:

?replace_ds()