data_pipelines-1.x-dev/tests/modules/data_pipelines_test/data_pipelines_test.data_pipelines.yml

tests/modules/data_pipelines_test/data_pipelines_test.data_pipelines.yml
test_pipeline_1:
  label: 'Test pipeline 1'
  transforms:
    field:
      should_we:
        - plugin: map
          map:
            Y: true
            N: false
    record:
      - plugin: concat
        fields:
          - lastname
          - firstname
        as: full_name
        separator: ', '
      - plugin: remove
        fields:
          - lastname
          - firstname
  validations:
    record:
      ItemCount:
        expectedCount: 3
    field:
      firstname:
        NotBlank:
          message: 'Firstname is required'
        Length:
          min: 3
          minMessage: 'Firstname should be at least 3 characters'

invalid_pipeline_1:
  label: 'Invalid pipeline 1'
  transforms:
    field:
      should_we:
        - plugin: no_such_plugin
        - missing_plugin_id: true

invalid_pipeline_2:
  label: 'Pipeline with record transform for fields and view versa'
  transforms:
    field:
      should_we:
        - plugin: concat
    record:
      - plugin: map

pipeline_with_no_validation:
  label: 'No validation'
  transforms:
    field:
      should_we:
        - plugin: map
          map:
            Y: true
            N: false
pipeline_with_skip_transform:
  label: 'Pipeline with skip transform'
  transforms:
    field:
      should_we:
        - plugin: map
          map:
            Y: true
            N: false
    record:
      - plugin: concat
        fields:
          - lastname
          - firstname
        as: full_name
        separator: ', '
      - plugin: remove
        fields:
          - lastname
          - firstname
      - plugin: skip
        field: full_name
        value: 'bloggs, joe'
pipeline_with_skip_transform_not_equals:
  label: 'Pipeline with skip transform (Not equals)'
  transforms:
    field:
      should_we:
        - plugin: map
          map:
            Y: true
            N: false
    record:
      - plugin: concat
        fields:
          - lastname
          - firstname
        as: full_name
        separator: ', '
      - plugin: remove
        fields:
          - lastname
          - firstname
      - plugin: skip
        field: full_name
        not_equals: true
        value: 'bloggs, joe'

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc