Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flattening workbook view data #34

Open
Ahaberling opened this issue Nov 28, 2023 · 3 comments
Open

Flattening workbook view data #34

Ahaberling opened this issue Nov 28, 2023 · 3 comments

Comments

@Ahaberling
Copy link

Hello G my favorite sheep,

I adjusted your tap a little bit for our use case. Having the "workbooks" stream returning the view data as a list, turned out a little bit inconvenient for us. I excluded it from the "workbooks" stream and created a separate stream for it. Are you interested in a PR implementing this change in your tap as well, or do you prefer your current version?

Cheers
Alex

@Ahaberling
Copy link
Author

Ps. sorry for not replying to the other issue, I forgot about it. The tap is and has been working very well for us since we started using it this year. We are starting to pull more data entities right now

@GtheSheep
Copy link
Owner

Hey @Ahaberling - do you mean flattening it out into a child stream? did it make an extra api request to gain further details about the view? sounds interesting!! Sounds like a cleaner way than this big JSON list that's there now 😸

and no worries! glad to hear it's been working ok 👌

@Ahaberling
Copy link
Author

Right now Im just making the same api call as in the "workbooks" stream and then filter the records differently in order to arrive at a schema like this:

schema = th.PropertiesList(
th.Property("id", th.StringType),
th.Property("name", th.StringType),
th.Property("view.id", th.StringType),
th.Property("view.name", th.StringType),
th.Property("view.total_views", th.NumberType),
th.Property("view.content_url", th.StringType),
th.Property("view.owner_id", th.StringType),
).to_dict()

The first two properties refer to workbook id and name.
If I find some times the next days, I will try to find a more elegant solution that does not simply replicate the api call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants