Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LoadCmd = &cobra.Command{ Deprecated: "use `table load` instead", Use: "load", Short: "Loads data into a table.", Run: func(cmd *cobra.Command, args []string) { log.Debug().Msg("starting load") var fileType apiv1alpha.FileType switch fileTypeIn { case "parquet", "": fileType = apiv1alpha.FileType_FILE_TYPE_PARQUET case "csv": fileType = apiv1alpha.FileType_FILE_TYPE_CSV default: utils.LogAndQuitIfErrorExists(fmt.Errorf("unrecognized file type - must be one of 'parquet', 'csv'")) } if len(filePaths) == 0 { utils.LogAndQuitIfErrorExists(fmt.Errorf("at least one `file` flag must be set")) } apiClient := api.NewApiClient() for _, file := range filePaths { err := apiClient.LoadFile(tableName, &apiv1alpha.FileInput{FileType: fileType, Uri: file}) utils.LogAndQuitIfErrorExists(err) } log.Debug().Msg("Success!") }, }
LoadCmd represents the load command
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.