Skip to main content
Version: 8.1

system.dataset.appendDataset

This function is used in Python Scripting.

Description

Takes two different datasets and returns a new dataset with the second dataset appended to the first. Will throw an error if the number and types of columns do not match.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.dataset.appendDataset(dataset1, dataset2)

Parameters

TypeParameterDescription
Datasetdataset1The dataset that will come first in the returned dataset.
Datasetdataset2The second dataset that will be appended to the end in the returned dataset.

Returns

Dataset - A new dataset that is a combination of the original two datasets.

Scope

Gateway, Vision Client, Perspective Session

Code Examples

Code Snippet
# This example pulls in the datasets from two different Vision table components, 
# combines them, then writes the results to a third table.
# The two source datasets must have the same number and types of columns.

data1 = event.source.parent.getComponent('Table 1').data
data2 = event.source.parent.getComponent('Table 2').data
comboData = system.dataset.appendDataset(data1, data2)
event.source.parent.getComponent('Table 3').data = comboData
Code Snippet
# This code takes datasets from two Vision Power Tables and appends them onto a regular Table.
# Get dataset from first power table
dataset1 = event.source.parent.getComponent('Power Table 1').data

#get dataset from second power table
dataset2 = event.source.parent.getComponent('Power Table 2').data

#use system.dataset.appendDataset() to combine datasets
dataset3 = system.dataset.appendDataset(dataset1, dataset2)

#assign data to third table
event.source.parent.getComponent('Table').data = dataset3

Keywords

system dataset appendDataset, dataset.appendDataset