@@ -8,23 +8,6 @@ pub enum Commands {
88 command : Option < AuthCommands > ,
99 } ,
1010
11- /// Derived views — virtual SQL tables built from queries over your data
12- Datasets {
13- /// Dataset ID to show details
14- id : Option < String > ,
15-
16- /// Workspace ID (defaults to first workspace from login)
17- #[ arg( long, short = 'w' , global = true ) ]
18- workspace_id : Option < String > ,
19-
20- /// Output format (used with dataset ID)
21- #[ arg( long = "output" , short = 'o' , default_value = "table" , value_parser = [ "table" , "json" , "yaml" ] ) ]
22- output : String ,
23-
24- #[ command( subcommand) ]
25- command : Option < DatasetsCommands > ,
26- } ,
27-
2811 /// Execute a SQL query, or check status of a running query
2912 Query {
3013 /// SQL query string (omit when using a subcommand)
@@ -444,75 +427,6 @@ pub enum JobsCommands {
444427 } ,
445428}
446429
447- #[ derive( Subcommand ) ]
448- pub enum DatasetsCommands {
449- /// List all datasets in a workspace
450- List {
451- /// Maximum number of results (default: 100, max: 1000)
452- #[ arg( long) ]
453- limit : Option < u32 > ,
454-
455- /// Pagination offset
456- #[ arg( long) ]
457- offset : Option < u32 > ,
458-
459- /// Output format
460- #[ arg( long = "output" , short = 'o' , default_value = "table" , value_parser = [ "table" , "json" , "yaml" ] ) ]
461- output : String ,
462- } ,
463-
464- /// Create a derived view from a SQL query or saved query
465- Create {
466- /// SQL table name the dataset is addressable as (e.g. my_view)
467- #[ arg( long) ]
468- name : String ,
469-
470- /// Human-readable display label
471- #[ arg( long) ]
472- description : Option < String > ,
473-
474- /// SQL query to create the dataset from
475- #[ arg( long, conflicts_with = "query_id" , required_unless_present = "query_id" ) ]
476- sql : Option < String > ,
477-
478- /// Saved query ID to create the dataset from
479- #[ arg( long, conflicts_with = "sql" , required_unless_present = "sql" ) ]
480- query_id : Option < String > ,
481-
482- /// Output format
483- #[ arg( long = "output" , short = 'o' , default_value = "table" , value_parser = [ "table" , "json" , "yaml" ] ) ]
484- output : String ,
485- } ,
486-
487- /// Update a dataset's description and/or name
488- Update {
489- /// Dataset ID
490- id : String ,
491-
492- /// New display label
493- #[ arg( long) ]
494- description : Option < String > ,
495-
496- /// New SQL table name (must be a valid identifier)
497- #[ arg( long) ]
498- name : Option < String > ,
499-
500- /// Output format
501- #[ arg( long = "output" , short = 'o' , default_value = "table" , value_parser = [ "table" , "json" , "yaml" ] ) ]
502- output : String ,
503- } ,
504-
505- /// Refresh a dataset by re-running its source (URL fetch or saved query) and creating a new version
506- Refresh {
507- /// Dataset ID
508- id : String ,
509-
510- /// Submit as a background job
511- #[ arg( long) ]
512- r#async : bool ,
513- } ,
514- }
515-
516430#[ derive( Subcommand ) ]
517431pub enum WorkspaceCommands {
518432 /// List all workspaces
0 commit comments