Dataset Object Members for SuiteAnalytics Workbooks

Dataset object members in SuiteAnalytics enable data manipulation and execution for workbooks, enhancing your data analysis capabilities.

·3 min read·View Oracle Docs

TL;DR

The Dataset object in SuiteAnalytics encapsulates an entire dataset, providing methods and properties for efficient data manipulation and execution. Understanding its members will enhance your data analysis capabilities within workbooks.

What is the Dataset Object?

The Dataset object represents the collection of data that is used for generating insights within SuiteAnalytics workbooks. It simplifies data manipulation by allowing combinations of fields, filters, and conditions to create queries, serving as the backbone of visualizations within the NetSuite platform.

Dataset Object Members

The following members are associated with the dataset.Dataset object.

Member NameTypeDescription
Dataset.getExpressionFromColumn(options)workbook.ExpressionReturns an expression that can be utilized in a workbook.
Dataset.run()query.ResultSetExecutes the dataset and yields the result set, similar to the N/query module functionality.
Dataset.run.promise()Promise ObjectAsynchronously executes the dataset and provides the result set, akin to the N/query module.
Dataset.runPaged(options)query.PagedDataExecutes the dataset and returns the result in paginated format, following the N/query module pattern.
Dataset.save(options)ObjectSaves the current dataset configuration.
Dataset.columnsdataset.Column[]The columns that comprise the dataset.
Dataset.conditiondataset.ConditionThe criteria that governs the dataset filtering.
Dataset.descriptionstringA textual description of the dataset.
Dataset.idstringUnique identifier for the dataset.
Dataset.namestringThe display name of the dataset.
Dataset.typestringThe internal identifier for the primary record type associated with the dataset.

Code Examples

Creating a Dataset

The following code snippet illustrates how to create a basic and a comprehensive dataset using the dataset module:

suitescript
1// Create a basic Dataset
2var myDataset = dataset.create({
3 type: 'transaction'
4});
5
6// Create a comprehensive (full) Dataset
7var myDataset = dataset.create({
8 type: 'transaction',
9 name: 'My Transaction Dataset',
10 id: 'custdataset_dataset',
11 description: 'My comprehensive transaction dataset that includes columns and a condition',
12 condition: myCondition, // Assume this is created using dataset.createCondition
13 columns: [myColumns] // Assume this is created using dataset.createColumn
14});

Loading a Dataset

To load an existing dataset, you can use the following code:

suitescript
1// Load a dataset and view its details
2var myDataset = dataset.load({
3 id: '1' // Replace with a valid ID for your account
4});
5var myDatasetDataset = myDataset.Dataset;
6
7log.audit({
8 title: 'Dataset columns = ',
9 details: myDatasetDataset.columns
10});
11log.audit({
12 title: 'Dataset condition = ',
13 details: myDatasetDataset.condition
14});
15log.audit({
16 title: 'Dataset description = ',
17 details: myDatasetDataset.description
18});
19log.audit({
20 title: 'Dataset id = ',
21 details: myDatasetDataset.id
22});

Who This Affects

This information is particularly relevant for the following roles and stakeholders in NetSuite:

  • Developers: They will use this data structure to create and manage datasets programmatically.
  • Analytics Administrators: Responsible for creating and modifying datasets to support business analysis.
  • Data Analysts: Partake in leveraging datasets for generating insights from various business metrics.

Key Takeaways

  • The Dataset object is integral to SuiteAnalytics workbooks, enabling robust data manipulation.
  • It provides several methods for executing tasks within datasets, including synchronous and asynchronous options.
  • Understanding its properties helps maintain efficient dataset management for various business needs.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

Do I need special permissions to use Dataset objects in SuiteAnalytics?
The article doesn't specify the exact permissions required, but using SuiteAnalytics typically involves roles like Developers, Analytics Administrators, or Data Analysts who have access to create and manipulate datasets.
How can I load an existing dataset in SuiteScript?
You can load an existing dataset using the `dataset.load()` method. This requires specifying the valid ID of the dataset you wish to load in your account.
What is the purpose of the Dataset.runPaged(options) member?
The `Dataset.runPaged(options)` member allows you to execute the dataset and receive the results in a paginated format, which is useful for handling large datasets efficiently like the `N/query` module.
Is the Dataset object compatible with all SuiteAnalytics Workbook features?
The article suggests that the Dataset object is central to SuiteAnalytics Workbooks, supporting data manipulation and execution, but it does not specify limitations or compatibility with specific Workbook features.
Source: Dataset Object Members Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in SuiteAnalytics

View all SuiteAnalytics articles →