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

External Content Support (Databases and Tables) #445

Merged
merged 32 commits into from Aug 26, 2019

Conversation

t8y8
Copy link
Collaborator

@t8y8 t8y8 commented Jun 13, 2019

This is a work in progress, and is based on the permissions work, so this PR will fail against dev.

Still, here's a preview of the content types coming. They're pretty standard, following existing patterns.

The one thing that's a bit new, is I took some pieces of @shinchris 's refactor for objects that have lots of attributes.

@t8y8 t8y8 changed the title WIP: External Content Support External Content Support (Databases and Tables) Jul 27, 2019
@t8y8
Copy link
Collaborator Author

t8y8 commented Jul 27, 2019

Now that permissions is in, I've rebased this against HEAD.
The commits will all get squashed, don't worry about the gross history :P

This is much simpler than permissions, though it is more vulnerable to copy/paste errors, so some dedicated eyes are much appreciated. I removed the WIP, but I actually haven't spent as much time on this set, so I'll be testing against a Tableau Catalog enabled Server over the next few days to make sure this is ready. I will also add some tests :)

Copy link
Contributor

@shinchris shinchris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 😃 🚀
Are tests coming?


@property
def remote_type(self):
return self._remote_type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field should also be defined in the constructor to keep it consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point -- what is the pattern here?
That's not a user-editable attribute, and it's something we set purely from the XML response, sometimes we put these in constructors, sometimes we don't.

I can't add it here, just wondering.

self.parent_srv.namespace)
return columns

# Update workbook_connection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied comment from workbook

return self._certified

@certified.setter
def certified(self, value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is missing the boolean property decorator

self._certification_note = value

@property
def metadata_type(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one and a few below are not defined in the constructor. Also for port, should it be an integer property?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all of these properties will exist for all types (though metadata_type should).

Right now it lazily adds them based on whatever we pass to _set_values.
We could enumerate them all, but I thought it was a lot of copy/paste work to add them there and to _set_values.

Happy to do it if you think we should. It raises the question again about what makes it into constructor vs what doesn't.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, I think it's good practice to have all properties defined in the constructor. That way we can easily see all the properties that the class can have, and avoids the possibility of an error from accessing it before assigned from the response.
Looks like we've been keeping that pattern for the other models as well.

@t8y8
Copy link
Collaborator Author

t8y8 commented Aug 12, 2019

Thanks! Question for you, fixed the small things, and I will create some basic tests for these endpoints, it'll take a bit... lots of xml files to copy/paste :)

@t8y8
Copy link
Collaborator Author

t8y8 commented Aug 26, 2019

Based on the earlier rocket, and letting wait for a week for any other emergency issues,merging this in 🔥. I'll monitor and fix forward any issues

@t8y8 t8y8 merged commit 19c6322 into tableau:development Aug 26, 2019
@shinchris shinchris mentioned this pull request Oct 4, 2019
shinchris pushed a commit that referenced this pull request Oct 4, 2019
Release v0.9
## 0.9 (4 Oct 2019)

* Added Metadata API endpoints (#431)
* Added site settings for Data Catalog and Prep Conductor (#434)
* Added new fields to ViewItem (#331)
* Added support and samples for Tableau Server Personal Access Tokens (#465)
* Added Permissions endpoints (#429)
* Added tags to ViewItem (#470)
* Added Databases and Tables endpoints (#445)
* Added Flow endpoints (#494)
* Added ability to filter projects by topLevelProject attribute (#497)
* Improved server_info endpoint error handling (#439)
* Improved Pager to take in keyword arguments (#451)
* Fixed UUID serialization error while publishing workbook (#449)
* Fixed materalized views in request body for update_workbook (#461)
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

Successfully merging this pull request may close these issues.

None yet

3 participants