Hello has anyone used the extractor `tap-amazon-sp...
# troubleshooting
s
Hello has anyone used the extractor
tap-amazon-sp
? There is an option to provide a 'report_name' config. But when I run
meltano select tap-amazon-sp --list --all
, I don't see the name of that report or it's tables anywhere. How do I fetch there reports (especially
GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL
)?
p
@shubham what variant of the tap are you using? I'm not seeing the report_name config that you mentioned. Do you mean report_types?
s
@pat_nadolny yes I meant report_type. I am using
Hotglue
variant. The default values that are specified are similar to
GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL
. Do you know any way of fetching these reports via meltano?
u
Have you tried configuring https://docs.meltano.com/reference/command-line-interface/#config your report type to override those defaults? What happens when you do that, is it erroring for you?
s
yes, I have. If I set the report_type to any one of the reports then it has no effect. The tap gives me either the tables listed with the
select
extra, or all the tables available (in
--list --all
) but not the report. @pat_nadolny
u
Would you mind sharing your meltano.yml file with any sensitive data removed?
u
You can also run
meltano config tap-amazon-sp
to output your config to make sure it looks like you'd expect
u
Also for the record I havent personally used this tap but it sounds like it could be a configuration issue
s
@pat_nadolny sure. Here it is:
Copy code
version: 1
default_environment: dev
project_id: a8c7383d-e8b6-465c-9be9-197f40e7955c
environments:
- name: dev
- name: staging
- name: prod
plugins:
  extractors:
  - name: tap-amazon-sp
    variant: hotgluexyz
    pip_url: git+<https://gitlab.com/hotglue/tap-amazon-seller.git>
    config:
      flattening_enabled: false
      flattening_max_depth: 1
      marketplaces:
      - IN
      processing_status:
      - IN_QUEUE
      - IN_PROGRESS
      - DONE
      report_types:

      - GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL
      role_arn: xxxxxx
      sandbox: false
      start_date: '2023-07-01T00:00:00.000000Z'
    select:
    # - orders.AmazonOrderId
    # - orders.LastUpdateDate
    # - orders.EarliestShipDate
    # - orders.SalesChannel
    # - orders.OrderStatus
    # - orders.NumberOfItemsShipped
    # - orders.OrderType
    # - orders.IsPremiumOrder
    # - orders.IsPrime
    # - orders.FulfillmentChannel
    # - orders.NumberOfItemsUnshipped
    # - orders.HasRegulatedItems
    # - orders.IsReplacementOrder
    # - orders.IsSoldByAB
    # - orders.LatestShipDate
    # - orders.ShipServiceLevel
    # - orders.MarketplaceId
    # - orders.PurchaseDate
    # - orders.SellerOrderId
    # - orders.PaymentMethod
    # - orders.IsBusinessOrder
    # - orders.OrderTotal
    # - orders.OrderTotal.*
    # - orders.OrderTotal__CurrencyCode
    # - orders.OrderTotal__Amount
    # - orders.PaymentMethodDetails
    # - orders.IsGlobalExpressEnabled
    # - orders.LastUpdateDate
    # - orders.ShipmentServiceLevelCategory

    - orderitems.*

    metadata:
      '*':
        key_properties: __null__

    # schema:
    #   orderitems:
    #     AmazonOrderId:
    #       type: '["string", "null"]'
    #     OrderItems:
    #       type: '["array", "null"]'

    # stream_maps:
    #   orders:
    #     __alias__: orders
    #   orderitems:
    #     __alias__: orderitems
u
Thanks - Have you tried setting your select criteria to this:
Copy code
select:
    - reports.*
It looks like the tap reads those report types in as a single
reports
stream. I dont see that stream selected in your configuration
s
Hm I never tried it. I just did it and it fails with this message:
Copy code
tap_amazon_seller.utils.InvalidResponse: [{'code': 'Unauthorized', 'message': 'Access to requested resource is denied.', 'details': ''}]
which is strange as none of the other configs were changed and they work for other entities like
orders, orderitems.
Anyways, I'll debug this and see if I get the report. Thanks for your response!