-
Notifications
You must be signed in to change notification settings - Fork 209
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
Add new cli configure options #2330
Add new cli configure options #2330
Conversation
/azp run |
/azp run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggestions and clarification on tests. also some clarifying questions.
Co-authored-by: Sean Leonard <[email protected]>
/azp run |
/azp run |
/azp run |
Question with respect to breaking the command up
what happens if we put another command in between these 2, will it still accept the final command? If so, what happens if the command in between them changes the database-type to something other than cosmos? so something like
And then another case. If the 2nd command also included the database-type command
I presume that all of the above would fail but just want to double check. |
Follow up question, for the case that I quoted. Does order of the options within the command itself here matter? So for example what if we send these 2 commands, and note that the changing of the dbtype to mssql happens at the end of the 2nd command
Does this fail? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a comment about some code duplication in the tests, and then a question about some edge cases to make sure they get handled.
Yes, both the commands will fail. Every command gets checked for correct database-type. if that's changed in midway. it will error it out. |
yes, because the options provided do not belong to mssql type. |
/azp run |
Why make this change?
dab configure --data-source
in CLI #2295What is this change?
database-type
MSSQL
,PostgreSQL
,CosmosDB_NoSQL
,MySQL
connection-string
options.database
options.container
options.schema
options.set-session-context
true
,false
(default:false
)NOTES:
Certain properties that are specific to database can only be updated with the correct databaseType.
For Example: If the database type initially was MSSQL, and we give cosmosDBoptions without specifying the new dbType as cosmosDB_NoSQL, the command will fail.
For better usability, we will also allow users to first update the dbType to cosmosDB_NoSQL and then in a new command provide the cosmosDB specifig options, since using all the options in one command can be very long and errornous.
How was this tested?
Sample Request(s)
To update to mssql
dab configure --data-source.database-type mssql --data-source.options.set-session-context true
To update to cosmosDB_NoSQL
Single command
dab configure --data-source.database-type cosmosdb_nosql --data-source.options.database testdbname --data-source.options.schema testschema.gql
Break the command
dab configure --data-source.database-type cosmosdb_nosql
dab configure --data-source.options.database testdbname --data-source.options.schema testschema.gql