astromodule.splus.SplusService.batch_query#
- SplusService.batch_query(sql: List[str], save_path: List[str | Path], join: bool = False, replace: bool = False, scope: Literal['public', 'private'] = 'public', fmt: str = 'text/csv', workers: int = None)[source]#
Sends a batch of queries to splus.cloud database
- Parameters:
- sql: list of str
The sql query string
- save_path: list of str or list of Path
The path where the query output will be saved
- join: bool (optional)
Join all tables
- repalace: bool (optional)
This method checks if a file exists in
save_path
location before the download. If this parameters isTrue
and a file exists insave_path
location, this method will ovewrite the existing file. If this parameter isFalse
and a file exists insave_path
location, this method will skip the download. Default toFalse
- scope: str (optional)
The splus.cloud scope. Can be
public
orprivate
. Useprivate
only if you are assigned as collaborator. Defaults topublic
- fmt: str (optional)
The mime-type of query output. Defaults to
text/csv
- workers: int (optional)
The number of parallel processes that will be spawned. Defaults to 1