Is it possible to set field pointers for record se...
# ask-community-for-troubleshooting
a
Is it possible to set field pointers for record selectors for each stream individually?
s
I haven't tried it but it does seem possible:
Copy code
Since the Retriever is defined as part of the Stream configuration, different Streams for a given Source can use different Retriever definitions if needed.
My understanding is that you can override the global base stream configuration by defining the
retriever
object at stream level. So, this is the base stream config for the Sendgrid example connector:
Copy code
definitions:
  ...
  base_stream:
    type: DeclarativeStream
    schema_loader:
      $ref: "*ref(definitions.schema_loader)"
    retriever:
      $ref: "*ref(definitions.retriever)"
      record_selector:
        extractor:
          field_pointer: []
      requester:
        $ref: "*ref(definitions.requester)"
      paginator:
        type: NoPagination
So, altogether: adding a similar configuration to a stream object. The
lists
stream below will pull defaults from the
definitions.base_stream.retriever
using
$ref
, and then all additional configuration for
record_selector
and
pagination
is applied over those defaults:
Copy code
definitions:
  ...
  base_stream:
    type: DeclarativeStream
    schema_loader:
      $ref: "*ref(definitions.schema_loader)"
    retriever:
      $ref: "*ref(definitions.retriever)"
      record_selector:
        extractor:
          field_pointer: []
      requester:
        $ref: "*ref(definitions.requester)"
      paginator:
        type: NoPagination
streams:
  - $ref: "*ref(definitions.base_stream)"
    $options:
      name: "lists"
      primary_key: "id"
      path: "/v3/marketing/lists"
    retriever:
      $ref: "*ref(definitions.base_stream.retriever)"
      record_selector:
        extractor:
          field_pointer: ["foobar"]
      paginator:
        $ref: "*ref(definitions.cursor_paginator)"
I think it would probably have very limited scope though, only for that stream.
a
Hmm, I'll give it a try and let you know
It did work thanks a lot! 😄
octavia loves 1
s
I'm glad to hear it worked out 🙂