Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions docs/environment-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Environment Variables
layout: docs
---

Tableau Server Client (TSC) can use environment variables to pull configuration
settings. This is a convenient way to manage the setting in one place and have
it used across all of the related calls.

## Supported environment variables

The following environment variables are supported by TSC:

Name | Description | Version | Default | Limit
:--- | :--- | :--- | :--- | :---
`TSC_CHUNK_SIZE_MB` | The size of chunks when uploading files. Limit is 64 MB. | 0.33 | 50 | 64
`TSC_PAGE_SIZE` | The number of items to return in a single page of results. | 0.33 | 100 | 1000

## Setting environment variables

To set an environment variable, you can use the `os` module in Python. Here is
an example of setting the environment variables for the chunk size and page size:

```py
import os

import tableauserverclient as TSC

os.environ['TSC_CHUNK_SIZE_MB'] = '64'
os.environ['TSC_PAGE_SIZE'] = '1000'

# Continue with your TSC code
```

You can set these environment variables in your Python script, shell, IDE, bash
or PowerShell profile, CI/CD pipeline, .env file, or any other place where you
can set environment variables.

## Using environment variables

The TSC library will automatically pick up the environment variables when they
are set. If you set the environment variables in your Python script, they will
be used for the duration of the script. If you set them in your shell or IDE,
they will be used for all scripts that run in that environment.