Techiio-author
Started by Jofar ArcharNov 10, 2021

Open
How to map fields automatically in appflow?

7 VIEWES 2 LIKES 0 DISLIKES SHARE
2 LIKES 0 DISLIKES 7 VIEWES SHARE

I am too looking to automated app flow introduction thru cloud formation. I have a couple of fields (one hundred thirty+) in supply & I'm not able to map it manually. From UI I will without delay choose multiple columns but from cloud formation, I ought to specify, therefore looking if any choice with a purpose to automatically fetch all columns from the supply.

AWSTemplateFormatVersion: "2010-09-09"
Metadata:
    Generator: "Automation"
Description: ""
Parameters:
  snowusername:
    Type: String
    MaxLength: 128
  snowpassword:
    Type: String
    MaxLength: 128
  ServicenowUrl:
    Type: String
    MaxLength: 180
Resources:
    AppFlowFlowTest:
        Type: "AWS::AppFlow::Flow"
        Properties:
            FlowName: "IMGroupTest"
            Description: "Servicenow"
            SourceFlowConfig:
                ConnectorType: "Servicenow"
                ConnectorProfileName: !Ref AppFlowConnectorProfile
                SourceConnectorProperties:
                    ServiceNow:
                        Object: "business_service_group"
            DestinationFlowConfigList:
              -
                ConnectorType: "S3"
                DestinationConnectorProperties:
                    S3:
                        BucketName: "raw-data
                        BucketPrefix: "servicenow/appflow"
                        S3OutputFormatConfig:
                            FileType: "PARQUET"
                            PrefixConfig:
                                PrefixType: "FILENAME"
                            AggregationConfig:
                                AggregationType: "None"
            TriggerConfig:
                TriggerType: "OnDemand"
            Tasks:
              -
                SourceFields:
                  - "id"
                  - "site_name"
                  .
                  .
                  .
                  .

1 Replies

Techiio-commentatorSagar Rabidas replied 2 months ago0 likes0 dislikes

The AWS documentation on using Map_all is a bit lacking. The Map_all task, at least when using YAML, errors out when no TaskProperties are passed. To get around this, I added the property of EXCLUDE_SOURCE_FIELDS_LIST and pass an empty list, since I don't want any fields excluded.

Here is the relevant section of the template:

Tasks:
  - TaskType: Map_all
    SourceFields: []
    TaskProperties: 
    - Key: EXCLUDE_SOURCE_FIELDS_LIST
      Value: '[]'
    ConnectorOperator:
      Salesforce: NO_OP

Here is my full template

    AWSTemplateFormatVersion: 2010-09-09
Description: CloudFormation Template for a MAP_ALL Salesforce AppFlow
Parameters:
  Connection:
    Type: String
  S3Bucket:
    Type: String
  BucketPrefix:
    Type: String
  ObjectName:
    Type: String
  FlowName:
    Type: String
Resources:
  GenericFlow:
    Type: 'AWS::AppFlow::Flow'
    Properties:
      Description: !Join [ "", [ 'App Flow for ', !Ref ObjectName, ' object' ] ]
      DestinationFlowConfigList:
        - ConnectorType: S3
          DestinationConnectorProperties:
            S3:
              BucketName: !Ref S3Bucket
              BucketPrefix: !Ref BucketPrefix
              S3OutputFormatConfig:
                AggregationConfig:
                  AggregationType: None
                FileType: PARQUET
      FlowName: !Ref FlowName
      SourceFlowConfig:
        ConnectorProfileName: !Ref Connection
        ConnectorType: Salesforce
        SourceConnectorProperties:
          Salesforce:
            EnableDynamicFieldUpdate: true
            IncludeDeletedRecords: false
            Object: !Ref ObjectName
      Tasks:
        - TaskType: Map_all
          SourceFields: []
          TaskProperties: 
          - Key: EXCLUDE_SOURCE_FIELDS_LIST
            Value: '[]'
          ConnectorOperator:
            Salesforce: NO_OP
      TriggerConfig:
        TriggerType: OnDemand
You must be Logged in to reply
Trending Technologies
15
Software40
DevOps46
Frontend Development24
Backend Development20
Server Administration17
Linux Administration26
Data Center24
Sentry24
Terraform23
Ansible83
Docker70
Penetration Testing16
Kubernetes21
NGINX20
JenkinsX17
Recommended Blogs
1
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance