Skip to content

Comments

sf cli auth#72

Merged
joroscoSF merged 3 commits intomainfrom
jo_sf_cli
Feb 20, 2026
Merged

sf cli auth#72
joroscoSF merged 3 commits intomainfrom
jo_sf_cli

Conversation

@joroscoSF
Copy link
Contributor

No description provided.

> --alias myorg`, you can skip `datacustomcode configure` entirely:
> ```zsh
> datacustomcode run ./payload/entrypoint.py --sf-cli-org myorg
> ```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you seen if/how this will work with jupyter notebook?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not. What I can say is this --sf-cli-org flag is in addition to what we already have. Everything else continues to work.

brew install sf

# npm (all platforms)
npm install --global @salesforce/cli
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to make sure I'm following- are both of these needed? Or as a macOS user, only brew install is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally installed via npm and didn't even know brew was a thing until later. You are correct however when you say you only need one way or the other.


Once authenticated, pass the alias directly to `datacustomcode run`:
```zsh
datacustomcode run ./payload/entrypoint.py --sf-cli-org myorg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we thinking about this in phases? I could see us wanting to utilize SF CLI as the main/default option, if not even the only option in time.

Did you consider saving the SF CLI org ailas in one of this CLI's config locations - that way --sf-cli-org wouldn't need to be remembered for each command run? And/or an env var that'd do the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea and I did not consider this approach as the --profile doesn't work this way either. I will create a ticket to implement something like this in a future update.

else:
spark_type = PANDAS_TYPE_MAPPING.get(str(dtype), StringType())
fields.append(StructField(column, spark_type, nullable))
return StructType(fields)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are lines 49-68 duplicated from the query_api.py file? Might consider a util for reuse. And honestly, I'm not sure these conversions are needed - I remember testing various queries successfully without it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, change pushed to address this.

@joroscoSF joroscoSF merged commit e4bc9bb into main Feb 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants