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.

已提問 2 年前檢視次數 381 次
1 個回答
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
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南