redivis.config
redivis.config([options]) → object
Sets library-wide defaults, and returns the current configuration. Values that haven't been set fall back to their environment variables (in Node.js). Pass null to clear a previously set value.
Options passed directly to a method (e.g., table.toArrowTable({ maxParallelization: 2 })) always take precedence over the configuration.
redivis.config({ defaultWorkflow: 'jane.my_workflow' });
const table = redivis.table('output_table'); // Within jane.my_workflow
const rows = await redivis.query('SELECT * FROM output_table LIMIT 10').toRowsArray();Parameters:
options.defaultWorkflow : string | Workflow | null
The workflow (owner.workflow) within which unqualified table, query, parameter, transform, notebook, and datasource references are resolved.
options.defaultDataset : string | Dataset | null
The dataset (owner.dataset) within which unqualified table and query references are resolved, when there's no default workflow.
options.defaultUser : string | User | null
The owner of unqualified dataset and workflow references.
options.defaultOrganization : string | Organization | null
The owner of unqualified dataset and workflow references, when there's no default user.
options.apiEndpoint : string | null
The base URL of the Redivis API. Defaults to https://redivis.com/api/v1.
options.configDir : string | null
The directory in which credentials are cached after logging in, in Node.js. Defaults to ~/.redivis. Credentials for redivis.com are cached directly in this directory, and those for any other API endpoint in a subdirectory for its host (e.g., environments/localhost_8080/). Changing it loads any credentials cached in the new directory.
options.maxParallelization : number | null
The default for the maxParallelization option of methods that read data, upload files, or download files. When not set, each method uses its own default. Reads are always limited to at most 8 parallel streams.
Invalid values throw a ValueError, and no settings are changed.
Returns: { defaultWorkflow?, defaultDataset?, defaultUser?, defaultOrganization?, apiEndpoint, configDir?, maxParallelization? }, the current configuration.
Was this helpful?

