Skip to content

Commit

Permalink
bug fix for create_dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
zainhoda committed Jul 20, 2023
1 parent 91f4a3b commit 244a105
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vanna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ def create_dataset(dataset: str, db_type: str) -> bool:
Returns:
bool: True if the dataset was created successfully, False otherwise.
"""
global __org
if __org is None:
__org = 'demo-tpc-h'

params = [NewOrganization(org_name=dataset, db_type=db_type)]

d = __rpc_call(method="create_org", params=params)
Expand Down Expand Up @@ -270,7 +274,6 @@ def _set_org(org: str) -> None:

if create.lower() == 'y':
db_type = input("What type of database would you like to use? (Snowflake, BigQuery, Postgres, etc.): ")
__org = 'demo-tpc-h'
if create_dataset(dataset=org, db_type=db_type):
__org = org
else:
Expand Down

0 comments on commit 244a105

Please sign in to comment.