PhycialTableMap value when creating a dataset of datasets using CreateDataSet API

0

I'm trying to think of a way to create a new dataset by joining existing datasets using CreateDataSet API in javascript. I will mention join and tranforms in LogicalTableMap. What should be the value for PhysicalTableMap be in this case?

asked a year ago274 views
1 Answer
0

I don't know if it will be a reference for API key parameters, but it's an excerpt of the code I used to create a dataset with CloudFormation.

  # QuickSight DataSet
  RepDataSet:
    Type: AWS::QuickSight::DataSet
    Properties:
      AwsAccountId: !Ref AWS::AccountId
      Name: 'Join-Company'
      DataSetId: 'Join-Company-Id'
      ImportMode: SPICE
      PhysicalTableMap:
        rep-physical:
          RelationalTable:
            DataSourceArn: !GetAtt AthenaDataSource.Arn
            # Set Database Name
            Schema: 
              Fn::ImportValue:
                !Sub "${Env}-GlueDatabase-Name"
            # Set Table Name
            Name: !Ref RepTable
            InputColumns:
              - Name: source
                Type: STRING
              - Name: destination
                Type: STRING
        id-physical:
          RelationalTable:
            DataSourceArn: !GetAtt AthenaDataSource.Arn
            # Set Database Name
            Schema: 
              Fn::ImportValue:
                !Sub "${Env}-GlueDatabase-Name"
            # Set Table Name
            Name: !Ref IdTable
            InputColumns:
              - Name: id
                Type: STRING
              - Name: name
                Type: STRING
      LogicalTableMap: 
        rep-logical:
          Alias: 'rep-Alias'
          Source:
            PhysicalTableId: rep-physical
        id-logical:
          Alias: 'id-Alias'
          Source:
            PhysicalTableId: id-physical
        company-logical: 
          Alias: company-join-rep-id
          Source:
            JoinInstruction: 
              LeftOperand: rep-logical
              RightOperand: id-logical
              RightJoinKeyProperties:
                UniqueKey: true
              OnClause: 'destination = name'
              Type: LEFT
      Permissions:
        - Actions:
            - quicksight:UpdateDataSetPermissions
            - quicksight:DescribeDataSet
            - quicksight:DescribeDataSetPermissions
            - quicksight:PassDataSet
            - quicksight:DescribeIngestion
            - quicksight:ListIngestions
            - quicksight:UpdateDataSet
            - quicksight:DeleteDataSet
            - quicksight:CreateIngestion
            - quicksight:CancelIngestion
          Principal: !Sub arn:aws:quicksight:${AWS::Region}:${AWS::AccountId}:user/default/${QuickSightAdminUser}
profile picture
ARBR
answered a year 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