salesforce-data-customcode 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. salesforce_data_customcode-0.1.0/LICENSE.txt +206 -0
  2. salesforce_data_customcode-0.1.0/PKG-INFO +159 -0
  3. salesforce_data_customcode-0.1.0/README.md +135 -0
  4. salesforce_data_customcode-0.1.0/pyproject.toml +222 -0
  5. salesforce_data_customcode-0.1.0/src/datacustomcode/__init__.py +20 -0
  6. salesforce_data_customcode-0.1.0/src/datacustomcode/cli.py +142 -0
  7. salesforce_data_customcode-0.1.0/src/datacustomcode/client.py +227 -0
  8. salesforce_data_customcode-0.1.0/src/datacustomcode/cmd.py +105 -0
  9. salesforce_data_customcode-0.1.0/src/datacustomcode/config.py +149 -0
  10. salesforce_data_customcode-0.1.0/src/datacustomcode/config.yaml +15 -0
  11. salesforce_data_customcode-0.1.0/src/datacustomcode/credentials.py +97 -0
  12. salesforce_data_customcode-0.1.0/src/datacustomcode/deploy.py +379 -0
  13. salesforce_data_customcode-0.1.0/src/datacustomcode/io/__init__.py +14 -0
  14. salesforce_data_customcode-0.1.0/src/datacustomcode/io/base.py +28 -0
  15. salesforce_data_customcode-0.1.0/src/datacustomcode/io/reader/__init__.py +14 -0
  16. salesforce_data_customcode-0.1.0/src/datacustomcode/io/reader/base.py +34 -0
  17. salesforce_data_customcode-0.1.0/src/datacustomcode/io/reader/query_api.py +115 -0
  18. salesforce_data_customcode-0.1.0/src/datacustomcode/io/writer/__init__.py +14 -0
  19. salesforce_data_customcode-0.1.0/src/datacustomcode/io/writer/base.py +49 -0
  20. salesforce_data_customcode-0.1.0/src/datacustomcode/io/writer/csv.py +41 -0
  21. salesforce_data_customcode-0.1.0/src/datacustomcode/io/writer/print.py +33 -0
  22. salesforce_data_customcode-0.1.0/src/datacustomcode/mixin.py +94 -0
  23. salesforce_data_customcode-0.1.0/src/datacustomcode/py.typed +0 -0
  24. salesforce_data_customcode-0.1.0/src/datacustomcode/run.py +47 -0
  25. salesforce_data_customcode-0.1.0/src/datacustomcode/scan.py +153 -0
  26. salesforce_data_customcode-0.1.0/src/datacustomcode/template.py +36 -0
  27. salesforce_data_customcode-0.1.0/src/datacustomcode/templates/.devcontainer/devcontainer.json +10 -0
  28. salesforce_data_customcode-0.1.0/src/datacustomcode/templates/Dockerfile +20 -0
  29. salesforce_data_customcode-0.1.0/src/datacustomcode/templates/README.md +0 -0
  30. salesforce_data_customcode-0.1.0/src/datacustomcode/templates/jupyterlab.sh +97 -0
  31. salesforce_data_customcode-0.1.0/src/datacustomcode/templates/payload/config.json +1 -0
  32. salesforce_data_customcode-0.1.0/src/datacustomcode/templates/payload/entrypoint.py +10 -0
  33. salesforce_data_customcode-0.1.0/src/datacustomcode/templates/requirements-dev.txt +10 -0
  34. salesforce_data_customcode-0.1.0/src/datacustomcode/templates/requirements.txt +1 -0
@@ -0,0 +1,206 @@
1
+ Apache License Version 2.0
2
+
3
+ Copyright (c) 2025 Salesforce, Inc.
4
+ All rights reserved.
5
+
6
+ Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction,
15
+ and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by
18
+ the copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all
21
+ other entities that control, are controlled by, or are under common
22
+ control with that entity. For the purposes of this definition,
23
+ "control" means (i) the power, direct or indirect, to cause the
24
+ direction or management of such entity, whether by contract or
25
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
+ outstanding shares, or (iii) beneficial ownership of such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity
29
+ exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation
33
+ source, and configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical
36
+ transformation or translation of a Source form, including but
37
+ not limited to compiled object code, generated documentation,
38
+ and conversions to other media types.
39
+
40
+ "Work" shall mean the work of authorship, whether in Source or
41
+ Object form, made available under the License, as indicated by a
42
+ copyright notice that is included in or attached to the work
43
+ (an example is provided in the Appendix below).
44
+
45
+ "Derivative Works" shall mean any work, whether in Source or Object
46
+ form, that is based on (or derived from) the Work and for which the
47
+ editorial revisions, annotations, elaborations, or other modifications
48
+ represent, as a whole, an original work of authorship. For the purposes
49
+ of this License, Derivative Works shall not include works that remain
50
+ separable from, or merely link (or bind by name) to the interfaces of,
51
+ the Work and Derivative Works thereof.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original version of the Work and any modifications or additions
55
+ to that Work or Derivative Works thereof, that is intentionally
56
+ submitted to Licensor for inclusion in the Work by the copyright owner
57
+ or by an individual or Legal Entity authorized to submit on behalf of
58
+ the copyright owner. For the purposes of this definition, "submitted"
59
+ means any form of electronic, verbal, or written communication sent
60
+ to the Licensor or its representatives, including but not limited to
61
+ communication on electronic mailing lists, source code control systems,
62
+ and issue tracking systems that are managed by, or on behalf of, the
63
+ Licensor for the purpose of discussing and improving the Work, but
64
+ excluding communication that is conspicuously marked or otherwise
65
+ designated in writing by the copyright owner as "Not a Contribution."
66
+
67
+ "Contributor" shall mean Licensor and any individual or Legal Entity
68
+ on behalf of whom a Contribution has been received by Licensor and
69
+ subsequently incorporated within the Work.
70
+
71
+ 2. Grant of Copyright License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ copyright license to reproduce, prepare Derivative Works of,
75
+ publicly display, publicly perform, sublicense, and distribute the
76
+ Work and such Derivative Works in Source or Object form.
77
+
78
+ 3. Grant of Patent License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ (except as stated in this section) patent license to make, have made,
82
+ use, offer to sell, sell, import, and otherwise transfer the Work,
83
+ where such license applies only to those patent claims licensable
84
+ by such Contributor that are necessarily infringed by their
85
+ Contribution(s) alone or by combination of their Contribution(s)
86
+ with the Work to which such Contribution(s) was submitted. If You
87
+ institute patent litigation against any entity (including a
88
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
89
+ or a Contribution incorporated within the Work constitutes direct
90
+ or contributory patent infringement, then any patent licenses
91
+ granted to You under this License for that Work shall terminate
92
+ as of the date such litigation is filed.
93
+
94
+ 4. Redistribution. You may reproduce and distribute copies of the
95
+ Work or Derivative Works thereof in any medium, with or without
96
+ modifications, and in Source or Object form, provided that You
97
+ meet the following conditions:
98
+
99
+ (a) You must give any other recipients of the Work or
100
+ Derivative Works a copy of this License; and
101
+
102
+ (b) You must cause any modified files to carry prominent notices
103
+ stating that You changed the files; and
104
+
105
+ (c) You must retain, in the Source form of any Derivative Works
106
+ that You distribute, all copyright, patent, trademark, and
107
+ attribution notices from the Source form of the Work,
108
+ excluding those notices that do not pertain to any part of
109
+ the Derivative Works; and
110
+
111
+ (d) If the Work includes a "NOTICE" text file as part of its
112
+ distribution, then any Derivative Works that You distribute must
113
+ include a readable copy of the attribution notices contained
114
+ within such NOTICE file, excluding those notices that do not
115
+ pertain to any part of the Derivative Works, in at least one
116
+ of the following places: within a NOTICE text file distributed
117
+ as part of the Derivative Works; within the Source form or
118
+ documentation, if provided along with the Derivative Works; or,
119
+ within a display generated by the Derivative Works, if and
120
+ wherever such third-party notices normally appear. The contents
121
+ of the NOTICE file are for informational purposes only and
122
+ do not modify the License. You may add Your own attribution
123
+ notices within Derivative Works that You distribute, alongside
124
+ or as an addendum to the NOTICE text from the Work, provided
125
+ that such additional attribution notices cannot be construed
126
+ as modifying the License.
127
+
128
+ You may add Your own copyright statement to Your modifications and
129
+ may provide additional or different license terms and conditions
130
+ for use, reproduction, or distribution of Your modifications, or
131
+ for any such Derivative Works as a whole, provided Your use,
132
+ reproduction, and distribution of the Work otherwise complies with
133
+ the conditions stated in this License.
134
+
135
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
136
+ any Contribution intentionally submitted for inclusion in the Work
137
+ by You to the Licensor shall be under the terms and conditions of
138
+ this License, without any additional terms or conditions.
139
+ Notwithstanding the above, nothing herein shall supersede or modify
140
+ the terms of any separate license agreement you may have executed
141
+ with Licensor regarding such Contributions.
142
+
143
+ 6. Trademarks. This License does not grant permission to use the trade
144
+ names, trademarks, service marks, or product names of the Licensor,
145
+ except as required for reasonable and customary use in describing the
146
+ origin of the Work and reproducing the content of the NOTICE file.
147
+
148
+ 7. Disclaimer of Warranty. Unless required by applicable law or
149
+ agreed to in writing, Licensor provides the Work (and each
150
+ Contributor provides its Contributions) on an "AS IS" BASIS,
151
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152
+ implied, including, without limitation, any warranties or conditions
153
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154
+ PARTICULAR PURPOSE. You are solely responsible for determining the
155
+ appropriateness of using or redistributing the Work and assume any
156
+ risks associated with Your exercise of permissions under this License.
157
+
158
+ 8. Limitation of Liability. In no event and under no legal theory,
159
+ whether in tort (including negligence), contract, or otherwise,
160
+ unless required by applicable law (such as deliberate and grossly
161
+ negligent acts) or agreed to in writing, shall any Contributor be
162
+ liable to You for damages, including any direct, indirect, special,
163
+ incidental, or consequential damages of any character arising as a
164
+ result of this License or out of the use or inability to use the
165
+ Work (including but not limited to damages for loss of goodwill,
166
+ work stoppage, computer failure or malfunction, or any and all
167
+ other commercial damages or losses), even if such Contributor
168
+ has been advised of the possibility of such damages.
169
+
170
+ 9. Accepting Warranty or Additional Liability. While redistributing
171
+ the Work or Derivative Works thereof, You may choose to offer,
172
+ and charge a fee for, acceptance of support, warranty, indemnity,
173
+ or other liability obligations and/or rights consistent with this
174
+ License. However, in accepting such obligations, You may act only
175
+ on Your own behalf and on Your sole responsibility, not on behalf
176
+ of any other Contributor, and only if You agree to indemnify,
177
+ defend, and hold each Contributor harmless for any liability
178
+ incurred by, or claims asserted against, such Contributor by reason
179
+ of your accepting any such warranty or additional liability.
180
+
181
+ END OF TERMS AND CONDITIONS
182
+
183
+ APPENDIX: How to apply the Apache License to your work.
184
+
185
+ To apply the Apache License to your work, attach the following
186
+ boilerplate notice, with the fields enclosed by brackets "{}"
187
+ replaced with your own identifying information. (Don't include
188
+ the brackets!) The text should be enclosed in the appropriate
189
+ comment syntax for the file format. We also recommend that a
190
+ file or class name and description of purpose be included on the
191
+ same "printed page" as the copyright notice for easier
192
+ identification within third-party archives.
193
+
194
+ Copyright {yyyy} {name of copyright owner}
195
+
196
+ Licensed under the Apache License, Version 2.0 (the "License");
197
+ you may not use this file except in compliance with the License.
198
+ You may obtain a copy of the License at
199
+
200
+ http://www.apache.org/licenses/LICENSE-2.0
201
+
202
+ Unless required by applicable law or agreed to in writing, software
203
+ distributed under the License is distributed on an "AS IS" BASIS,
204
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
+ See the License for the specific language governing permissions and
206
+ limitations under the License.
@@ -0,0 +1,159 @@
1
+ Metadata-Version: 2.3
2
+ Name: salesforce-data-customcode
3
+ Version: 0.1.0
4
+ Summary: Data Cloud Custom Code SDK
5
+ License: Apache-2.0
6
+ Requires-Python: >=3.10,<3.12
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Operating System :: Unix
9
+ Classifier: Programming Language :: Python
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Requires-Dist: click (>=8.1.8,<9.0.0)
14
+ Requires-Dist: loguru (>=0.7.3,<0.8.0)
15
+ Requires-Dist: numpy
16
+ Requires-Dist: pandas
17
+ Requires-Dist: pydantic (>=1.8.2,<3.0.0)
18
+ Requires-Dist: pyspark
19
+ Requires-Dist: pyyaml (>=6.0,<7.0)
20
+ Requires-Dist: salesforce-cdp-connector
21
+ Requires-Dist: setuptools_scm (>=7.1.0,<8.0.0)
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Data Cloud Custom Code SDK
25
+
26
+ <img src="https://img.shields.io/badge/version-0.1.0-blue" alt="license">
27
+
28
+ This package provides a development kit for creating custom data transformations in [Data Cloud](https://www.salesforce.com/data/). It allows you to write your own data processing logic in Python while leveraging Data Cloud's infrastructure for data access and running data transformations, mapping execution into Data Cloud data structures like [Data Model Objects](https://help.salesforce.com/s/articleView?id=data.c360_a_data_model_objects.htm&type=5) and [Data Lake Objects](https://help.salesforce.com/s/articleView?id=sf.c360_a_data_lake_objects.htm&language=en_US&type=5).
29
+
30
+ More specifically, this codebase gives you ability to test code locally before pushing to Data Cloud's remote execution engine, greatly reducing how long it takes to develop.
31
+
32
+ Use of this project with Salesforce is subject to the [TERMS OF USE](./TERMS_OF_USE.md)
33
+
34
+ ## Installation
35
+ The SDK can be downloaded directly from PyPI with `pip`:
36
+ ```
37
+ pip install salesforce-data-customcode
38
+ ```
39
+
40
+ You can verify it was properly installed via CLI:
41
+ ```
42
+ datacustomcode version
43
+ ```
44
+
45
+ ## Development Setup
46
+ We offer two built-in development interfaces: `devcontainers` and Jupyter, but you can set up any tool you would like manually.
47
+
48
+ To get started, use the CLI to initialize a new development environment:
49
+ ```
50
+ datacustomcode init [DIRECTORY TO DUMP NEW REPO]
51
+ ```
52
+
53
+ This will yield all necessary files to get started:
54
+ ```
55
+ .
56
+ ├── Dockerfile
57
+ ├── README.md
58
+ ├── requirements.txt
59
+ ├── requirements-dev.txt
60
+ ├── payload
61
+ │ ├── config.json
62
+ │ ├── entrypoint.py
63
+ ├── jupyterlab.sh
64
+ └── requirements.txt
65
+ ```
66
+ * `Dockerfile` <span style="color:grey;font-style:italic;">(Do not update)</span> – Development container emulating the remote execution environment.
67
+ * `requirements-dev.txt` <span style="color:grey;font-style:italic;">(Do not update)</span> – These are the dependencies for the development environment.
68
+ * `jupyterlab.sh` <span style="color:grey;font-style:italic;">(Do not update)</span> – Helper script for setting up Jupyter.
69
+ * `requirements.txt` – Here you define the requirements that you will need remotely
70
+ * `payload` – This folder will be compressed and deployed to the remote execution environment.
71
+ * `config.json` – This config defines permissions on the back and can be generated programmatically with `scan` CLI method.
72
+ * `entrypoint.py` – The script that defines the data transformation logic.
73
+
74
+ ## API
75
+
76
+ You entry point script will define logic using the `Client` object which wraps data access layers.
77
+
78
+ You should only need the following methods:
79
+ * `read_dlo(name)` – Read from a Data Lake Object by name
80
+ * `read_dmo(name)` – Read from a Data Model Object by name
81
+ * `write_to_dlo(name, spark_dataframe, write_mode)` – Write to a Data Model Object by name with a Spark dataframe
82
+ * `write_to_dmo(name, spark_dataframe, write_mode)` – Write to a Data Lake Object by name with a Spark dataframe
83
+
84
+ For example:
85
+ ```
86
+ from datacustomcode import Client
87
+
88
+ client = Client()
89
+
90
+ sdf = client.read_dlo('my_DLO')
91
+ # some transformations
92
+ # ...
93
+ client.write_to_dlo('output_DLO')
94
+ ```
95
+
96
+
97
+ > [!WARNING]
98
+ > Currently we only support reading from DMOs and writing to DMOs or reading from DLOs and writing to DLOs, but they cannot mix.
99
+
100
+
101
+ ## CLI
102
+
103
+ The Data Cloud Custom Code SDK provides a command-line interface (CLI) with the following commands:
104
+
105
+ ### Global Options
106
+ - `--debug`: Enable debug-level logging
107
+
108
+ ### Commands
109
+
110
+ #### `datacustomcode version`
111
+ Display the current version of the package.
112
+
113
+ #### `datacustomcode configure`
114
+ Configure credentials for connecting to Data Cloud.
115
+
116
+ Options:
117
+ - `--profile TEXT`: Credential profile name (default: "default")
118
+ - `--username TEXT`: Salesforce username
119
+ - `--password TEXT`: Salesforce password
120
+ - `--client-id TEXT`: Connected App Client ID
121
+ - `--client-secret TEXT`: Connected App Client Secret
122
+ - `--login-url TEXT`: Salesforce login URL
123
+
124
+ #### `datacustomcode deploy`
125
+ Deploy a transformation job to Data Cloud.
126
+
127
+ Options:
128
+ - `--profile TEXT`: Credential profile name (default: "default")
129
+ - `--path TEXT`: Path to the code directory (default: ".")
130
+ - `--name TEXT`: Name of the transformation job [required]
131
+ - `--version TEXT`: Version of the transformation job (default: "0.0.1")
132
+ - `--description TEXT`: Description of the transformation job (default: "")
133
+
134
+ #### `datacustomcode init`
135
+ Initialize a new development environment with a template.
136
+
137
+ Argument:
138
+ - `DIRECTORY`: Directory to create project in (default: ".")
139
+
140
+ #### `datacustomcode scan`
141
+ Scan a Python file to generate a Data Cloud configuration.
142
+
143
+ Argument:
144
+ - `FILENAME`: Python file to scan
145
+
146
+ Options:
147
+ - `--config TEXT`: Path to save the configuration file (default: same directory as FILENAME)
148
+ - `--dry-run`: Preview the configuration without saving to a file
149
+
150
+ #### `datacustomcode run`
151
+ Run an entrypoint file locally for testing.
152
+
153
+ Argument:
154
+ - `ENTRYPOINT`: Path to entrypoint Python file
155
+
156
+ Options:
157
+ - `--config-file TEXT`: Path to configuration file
158
+ - `--dependencies TEXT`: Additional dependencies (can be specified multiple times)
159
+
@@ -0,0 +1,135 @@
1
+ # Data Cloud Custom Code SDK
2
+
3
+ <img src="https://img.shields.io/badge/version-0.1.0-blue" alt="license">
4
+
5
+ This package provides a development kit for creating custom data transformations in [Data Cloud](https://www.salesforce.com/data/). It allows you to write your own data processing logic in Python while leveraging Data Cloud's infrastructure for data access and running data transformations, mapping execution into Data Cloud data structures like [Data Model Objects](https://help.salesforce.com/s/articleView?id=data.c360_a_data_model_objects.htm&type=5) and [Data Lake Objects](https://help.salesforce.com/s/articleView?id=sf.c360_a_data_lake_objects.htm&language=en_US&type=5).
6
+
7
+ More specifically, this codebase gives you ability to test code locally before pushing to Data Cloud's remote execution engine, greatly reducing how long it takes to develop.
8
+
9
+ Use of this project with Salesforce is subject to the [TERMS OF USE](./TERMS_OF_USE.md)
10
+
11
+ ## Installation
12
+ The SDK can be downloaded directly from PyPI with `pip`:
13
+ ```
14
+ pip install salesforce-data-customcode
15
+ ```
16
+
17
+ You can verify it was properly installed via CLI:
18
+ ```
19
+ datacustomcode version
20
+ ```
21
+
22
+ ## Development Setup
23
+ We offer two built-in development interfaces: `devcontainers` and Jupyter, but you can set up any tool you would like manually.
24
+
25
+ To get started, use the CLI to initialize a new development environment:
26
+ ```
27
+ datacustomcode init [DIRECTORY TO DUMP NEW REPO]
28
+ ```
29
+
30
+ This will yield all necessary files to get started:
31
+ ```
32
+ .
33
+ ├── Dockerfile
34
+ ├── README.md
35
+ ├── requirements.txt
36
+ ├── requirements-dev.txt
37
+ ├── payload
38
+ │ ├── config.json
39
+ │ ├── entrypoint.py
40
+ ├── jupyterlab.sh
41
+ └── requirements.txt
42
+ ```
43
+ * `Dockerfile` <span style="color:grey;font-style:italic;">(Do not update)</span> – Development container emulating the remote execution environment.
44
+ * `requirements-dev.txt` <span style="color:grey;font-style:italic;">(Do not update)</span> – These are the dependencies for the development environment.
45
+ * `jupyterlab.sh` <span style="color:grey;font-style:italic;">(Do not update)</span> – Helper script for setting up Jupyter.
46
+ * `requirements.txt` – Here you define the requirements that you will need remotely
47
+ * `payload` – This folder will be compressed and deployed to the remote execution environment.
48
+ * `config.json` – This config defines permissions on the back and can be generated programmatically with `scan` CLI method.
49
+ * `entrypoint.py` – The script that defines the data transformation logic.
50
+
51
+ ## API
52
+
53
+ You entry point script will define logic using the `Client` object which wraps data access layers.
54
+
55
+ You should only need the following methods:
56
+ * `read_dlo(name)` – Read from a Data Lake Object by name
57
+ * `read_dmo(name)` – Read from a Data Model Object by name
58
+ * `write_to_dlo(name, spark_dataframe, write_mode)` – Write to a Data Model Object by name with a Spark dataframe
59
+ * `write_to_dmo(name, spark_dataframe, write_mode)` – Write to a Data Lake Object by name with a Spark dataframe
60
+
61
+ For example:
62
+ ```
63
+ from datacustomcode import Client
64
+
65
+ client = Client()
66
+
67
+ sdf = client.read_dlo('my_DLO')
68
+ # some transformations
69
+ # ...
70
+ client.write_to_dlo('output_DLO')
71
+ ```
72
+
73
+
74
+ > [!WARNING]
75
+ > Currently we only support reading from DMOs and writing to DMOs or reading from DLOs and writing to DLOs, but they cannot mix.
76
+
77
+
78
+ ## CLI
79
+
80
+ The Data Cloud Custom Code SDK provides a command-line interface (CLI) with the following commands:
81
+
82
+ ### Global Options
83
+ - `--debug`: Enable debug-level logging
84
+
85
+ ### Commands
86
+
87
+ #### `datacustomcode version`
88
+ Display the current version of the package.
89
+
90
+ #### `datacustomcode configure`
91
+ Configure credentials for connecting to Data Cloud.
92
+
93
+ Options:
94
+ - `--profile TEXT`: Credential profile name (default: "default")
95
+ - `--username TEXT`: Salesforce username
96
+ - `--password TEXT`: Salesforce password
97
+ - `--client-id TEXT`: Connected App Client ID
98
+ - `--client-secret TEXT`: Connected App Client Secret
99
+ - `--login-url TEXT`: Salesforce login URL
100
+
101
+ #### `datacustomcode deploy`
102
+ Deploy a transformation job to Data Cloud.
103
+
104
+ Options:
105
+ - `--profile TEXT`: Credential profile name (default: "default")
106
+ - `--path TEXT`: Path to the code directory (default: ".")
107
+ - `--name TEXT`: Name of the transformation job [required]
108
+ - `--version TEXT`: Version of the transformation job (default: "0.0.1")
109
+ - `--description TEXT`: Description of the transformation job (default: "")
110
+
111
+ #### `datacustomcode init`
112
+ Initialize a new development environment with a template.
113
+
114
+ Argument:
115
+ - `DIRECTORY`: Directory to create project in (default: ".")
116
+
117
+ #### `datacustomcode scan`
118
+ Scan a Python file to generate a Data Cloud configuration.
119
+
120
+ Argument:
121
+ - `FILENAME`: Python file to scan
122
+
123
+ Options:
124
+ - `--config TEXT`: Path to save the configuration file (default: same directory as FILENAME)
125
+ - `--dry-run`: Preview the configuration without saving to a file
126
+
127
+ #### `datacustomcode run`
128
+ Run an entrypoint file locally for testing.
129
+
130
+ Argument:
131
+ - `ENTRYPOINT`: Path to entrypoint Python file
132
+
133
+ Options:
134
+ - `--config-file TEXT`: Path to configuration file
135
+ - `--dependencies TEXT`: Additional dependencies (can be specified multiple times)