Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ datacustomcode deploy --path ./payload --name my_custom_script
> [!TIP]
> The `deploy` process can take several minutes. If you'd like more feedback on the underlying process, you can add `--debug` to the command like `datacustomcode --debug deploy --path ./payload --name my_custom_script`

You can now use the Salesforce Data Cloud UI to find the created Data Transform and use the `Run Now` button to run it.
Once the Data Transform run is successful, check the DLO your script is writing to and verify the correct records were added.

## API

Expand Down Expand Up @@ -130,12 +132,6 @@ Options:
- `--client-secret TEXT`: Connected App Client Secret
- `--login-url TEXT`: Salesforce login URL

#### `datacustomcode zip`
Zip a transformation job in preparation to upload to Data Cloud.

Options:
- `--path TEXT`: Path to the code directory (default: ".")

#### `datacustomcode deploy`
Deploy a transformation job to Data Cloud.

Expand Down Expand Up @@ -172,6 +168,12 @@ Options:
- `--config-file TEXT`: Path to configuration file
- `--dependencies TEXT`: Additional dependencies (can be specified multiple times)

#### `datacustomcode zip`
Zip a transformation job in preparation to upload to Data Cloud.

Options:
- `--path TEXT`: Path to the code directory (default: ".")

## Prerequisite details

### Creating a connected app
Expand All @@ -189,3 +191,7 @@ Options:
7. Go back to `Setup`, then `OAuth and OpenID Connect Settings`, and enable the "Allow OAuth Username-Password Flows" option

You now have all fields necessary for the `datacustomcode configure` command.

## Other docs

[Troubleshooting](./docs/troubleshooting.md)
26 changes: 26 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Troubleshooting

## Common errors

### Python version

```zsh
$ pip3 install salesforce-data-customcode
ERROR: Ignored the following versions that require a different python version: 0.1.0 Requires-Python <3.12,>=3.10; 0.1.2 Requires-Python <3.12,>=3.10
ERROR: Could not find a version that satisfies the requirement salesforce-data-customcode (from versions: none)
```

You are not using a supported version of python. For example, this package does not support version `3.9.6`. You must upgrade to 3.11, or use
[pyenv](https://github.com/pyenv/pyenv) to configure 3.11.

### JDK version

```zsh
pyspark.errors.exceptions.base.PySparkRuntimeError: [JAVA_GATEWAY_EXITED] Java gateway process exited before sending its port number.
```

This error indicates your machine either doesn't have a JDK configured, or an incompatible version of JDK is configured (e.g. 11).

Ensure that:
- `JAVA_HOME` is setup properly and you can run `java -version` successfully
- You have openJDK zulu 17 installed: https://www.azul.com/downloads/?package=jdk#zulu