You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a user, I would like the ability to create multi table metadata using Python. Right now, this is only partially supported because i can add columns but not new tables.
Expected behavior
Create an add_table method for the MultiTableMetadata object. This will create an empty table, after which the user can use add_column to fill out the columns.
Parameters
(required) table_name: A string with the name of the table to add
Invalid Table Name: Table name must be a string and cannot be empty
metadata.add_table(table_name='')
Error: Invalid table name (''). The table name must be a non-empty string.
Repeated Table Name: The table name cannot already exist
# assume the 'users' table already exists
metadata.add_table(table_name='users')
Error: Cannot add a table named 'users' because it already exists in the metadata. Please choose a different name.
Validation: In metadata.validate() we should add another check to validate that all tables have at least 1 column
metadata.add_table(table_name='sessions')
metadata.validate()
Error: Table 'sessions' has 0 columns. Use 'add_column' to specify its columns.
The text was updated successfully, but these errors were encountered:
Problem Description
As a user, I would like the ability to create multi table metadata using Python. Right now, this is only partially supported because i can add columns but not new tables.
Expected behavior
Create an
add_table
method for theMultiTableMetadata
object. This will create an empty table, after which the user can useadd_column
to fill out the columns.Parameters
table_name
: A string with the name of the table to addError Handling
Invalid Table Name: Table name must be a string and cannot be empty
Repeated Table Name: The table name cannot already exist
Validation: In
metadata.validate()
we should add another check to validate that all tables have at least 1 columnThe text was updated successfully, but these errors were encountered: