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

Creating workbooks and data source files #68

Open
henridwyer opened this issue Jul 28, 2016 · 5 comments
Open

Creating workbooks and data source files #68

henridwyer opened this issue Jul 28, 2016 · 5 comments

Comments

@henridwyer
Copy link

It would be very useful to be able to create a workbook or data source files, not only modify existing ones.

@benlower
Copy link
Contributor

Thanks, @henridwyer! Creation is definitely on our radar. Do you have any suggested starting points? How would you want to create something? Totally from scratch? Would love any more info you could provide about how you'd like to use it.

@henridwyer
Copy link
Author

It would be nice to create a TDS for any arbitrary connection, something like:

connection = Connection.create(dbname, server, username, authentication)
Datasource.create(output_file_name, connections=[connection]).save()

@benlower
Copy link
Contributor

OK cool thanks for the additional feedback.

From: Henri Dwyer [email protected]
Reply-To: tableau/document-api-python [email protected]
Date: Thursday, July 28, 2016 at 14:41
To: tableau/document-api-python [email protected]
Cc: Ben Lower [email protected], Comment [email protected]
Subject: Re: [tableau/document-api-python] Creating workbooks and data source files (#68)

It would be nice to create a TDS for any arbitrary connection, something like:

connection = Connection.create(dbname, server, username, authentication)
Datasource.create(output_file_name, connections=[connection]).save()

You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@t8y8
Copy link
Contributor

t8y8 commented Jul 30, 2016

Creating a connection (with the subset of elements we support today) would be pretty simple: Add a new class method that builds an empty Connection ElementTree-tree and then pass that into the existing Constructor and fill out all the attributes.

Making a datasource is a little trickier... Making the skeleton for the XML is easy enough, but we don't have any logic to build out columns and such yet -- I think an empty datasource would still load in Desktop/Server but I'd have to check to see if anything is broken.

I like the api recommended by @henridwyer -- connections=[c1, c2, c3]

t8y8 added a commit that referenced this issue Aug 15, 2016
Enable a prototypical API for creating new connections and datasources from scratch.
This uses ET to do XML manipulation, and is hard coded to "10.0" style integrated connections.

This will go away with the new editor/physical/logical model work underway, but it fixes a bug and will let us play around for now.
@rishabh-90
Copy link

Any update on this I am also trying to create empty Workbooks with DataSource in it.

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

No branches or pull requests

4 participants