-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
create table with custom primary_id #27
Conversation
Wow, thanks - this looks excellent! I was wondering whether an even nicer approach might be to set default values for the arguments, i.e.: primary_id='id', primary_type=Integer - this way the type of the primary key can be set freely and you don't need the branches in the code later on. I'm also thinking that we may want to make these arguments available in get_table, which calls create_table for non-existing relations. What do you think? |
Great. I like your suggestions and will make the changes. On 9/9/2013 7:47 AM, Friedrich Lindenberg wrote:
|
I take your suggestions and update the code. I also add an option for short-hand format of create/load table, so that users can intentionally create a new table with custom id and type passed-in as a tuple. If the table already exists, those id and type will be ignored. |
create table with custom primary_id
Thanks @dnatag, I've pushed a new version to pypi! This is a cool feature. |
Glad you like it. I am really grateful for your creation of dataset. It makes my life easier, so this is my part of thanks ;-} On Wednesday, September 18, 2013 at 6:55 AM, Friedrich Lindenberg wrote:
|
Add an option to create a table with custom primary_id instead of mandatory automatic 'id'. the type of custom primary_id can be a string (i.e. VARCHAR(255)) by default or an integer via integer flag. The caller will be responsible for the uniqueness of manually specified primary_id.
This custom id feature is only available via direct create_table call.