Hi everyone, I am trying to extract an excel file ...
# troubleshooting
a
Hi everyone, I am trying to extract an excel file from a target sharepoint drive using tap-ms-graph. I was led to believe that I should use this config in order to configure it but I am not getting my desired result. I am using tap-ms-graph from
Copy code
- name: tap-ms-graph
    variant: slalom-consulting
    pip_url: git+<https://github.com/Slalom-Consulting/tap-ms-graph.git>
example config:
Copy code
- name: tap-ms-graph
        config:
          tenant: tenant
          client_id: client
          client_secret: secret
          stream_config:
            testsharepoint:
              parameters: "sites/{site-id}/lists/{list-id}/items/{item-id}/driveItem/workbook/worksheets/Sheet1"
My goal is to pretty much to transform it to my target sql loader that I have confirmed working with another tap. Can anyone point me to any guide since the github readme is not very helpful. Thanks in advance 😄
a
Any error codes you can share? What is the result (even if not the desired one!)
a
yes, I need to clean it up a bit since it has sensitive data but can send what I get when I run meltano invoke tap-ms-graph
meanwhile do you see anything weird with the config.
Copy code
stream_config:
            testsharepoint:
              parameters: "sites/{site-id}/lists/{list-id}/items/{item-id}/driveItem/workbook/worksheets/Sheet1"
I am confident there is no issue with the authorization but rather the url i am using for the parameters
singer_sdk.exceptions.FatalAPIError: 403 Client Error: Forbidden for path: /v1.0/subscribedSkus tags": {"stream": "subscribedSkus", "endpoint": "/subscribedSkus", "http_status_code": 403, "status": "failed"}}
Copy code
"""Stream type classes for tap-ms-graph."""
from __future__ import annotations

from tap_ms_graph.client import MSGraphChildStream, MSGraphStream


class GroupsStream(MSGraphStream):
    name = "groups"
    path = "/groups"
    primary_keys = ["id"]
    odata_context = "groups"
    child_context = {"id": "group_id"}


class GroupMembersStream(MSGraphChildStream):
    parent_stream_type = GroupsStream
    name = "groupMembers"
    path = "/groups/{group_id}/members"
    primary_keys = ["group_id", "id"]
    odata_context = "directoryObjects"
    odata_type = "microsoft.graph.user"

    # TODO: find a way to make this automatic
    parent_context_schema = {
        "group_id": {"type": "string"},
    }


class SubscribedSkusStream(MSGraphStream):
    name = "subscribedSkus"
    path = "/subscribedSkus"
    primary_keys = ["id"]
    odata_context = "subscribedSkus"


class UsersStream(MSGraphStream):
    name = "users"
    path = "/users"
    primary_keys = ["id"]
    odata_context = "users"
i cant seem to figure out why its asking for these anyways
maybe i should use another tap, do you guys have any recommandations for extracting sharepoint files of type excel?
a
I don't use that tap I'm afraid. Could you remove the subscribedskus stream and see if that means the rest runs? It is a permissions issue with that one stream?
Basically can you narrow the issue down?
a
seem so, i am not even sure why the tap is even fetching any of the information above. but I will look at the source files and see if i can figure out why