Copying a Cross-Source DataSet in QuickSight using the JS SDK

0

I am trying to copy a cross-source dataset to another account using the JavaScript SDK. For single-source datasets this works fine, however am struggling to get it working with cross-source data. Copying involves describing the dataset on one account and using the returned parameters to create the dataset on another.

An example - The dataset I'm trying to copy is created using an outer join on two S3 based datasets, called 'trends' and 'aggregated'. The dataset's PhysicalTable is taken from the S3 datasource of the 'trends' data. When we describe the joined dataset we receive two LogicalTableOperations, one (presumably) linking the aggregated set and the other doing the join operation. The JSON for the linking operation looks like this:

 "Alias": "aggregated",
      "DataTransforms": [
        {
          "CastColumnTypeOperation": {
            "ColumnName": "percent",
            "NewColumnType": "DECIMAL",
            "Format": null
          }
        }
      ],
      "Source": {
        "PhysicalTableId": null
      }

When this is piped into the create stage of the copy it errors during createDataSet as PhysicalTableId can't be null. I already have the aggregated dataset on the second account and I have tried playing around with the DataSetArn parameter in Source, but that leads to another error saying it is an Unexpected Key. Does anyone know how can I link it to the new dataset using the sdk?

There is absolutely zero information online about this and I am going postal.

asked 2 years ago372 views
1 Answer
0

Hello, The LogicalTableSource needs to have one of three properties: a PhysicalTableId, a DataSetArn, or a JoinInstruction. At least one must be present. If you’re joining with another dataset, you should be using the DataSetArn property. I see that you are met with an Unexpected Key issue when attempting to supply this value. I would ask that you open a support case to further investigate the issue you are having.

Thank You.

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions