Skip to content

Conversation

@jswir
Copy link
Contributor

@jswir jswir commented Dec 10, 2025

Summary

  • Add --database-path and --mother-duck-token options to the create-duckdb command to enable MotherDuck connections
  • Removed -d short option to avoid conflict with global --debug flag
  • Add additionalExtensions field to DuckDBConnectionOptions/Config for feature parity with the core library
  • Document MotherDuck usage in README with examples

Usage

# With explicit token
malloy-cli connections create-duckdb my-motherduck \
  --database-path "md:my_database" \
  --mother-duck-token "your_token"

# With environment variable
export MOTHERDUCK_TOKEN="your_token"
malloy-cli connections create-duckdb my-motherduck --database-path "md:"

Test plan

  • Tested locally with MotherDuck sample_data database
  • Connection test passes
  • Query execution returns results from MotherDuck
  • Existing unit tests pass (BigQuery tests timeout as expected without credentials)

jswir added a commit to jswir/malloy-cli that referenced this pull request Dec 10, 2025
Add --mother-duck-token option to create-duckdb command to enable
MotherDuck connections. Addresses feedback from PR malloydata#124.

Changes:
- Add --mother-duck-token flag for MotherDuck API token with
  MOTHERDUCK_TOKEN environment variable support
- Remove -d short option from --database-path to avoid conflict
  with global --debug flag
- Wire motherDuckToken through createDuckDbConnectionCommand
- Add comprehensive test coverage for token option (CLI flag,
  environment variable, and without token)
- Update README with MotherDuck documentation emphasizing
  environment variable usage for security

The token is properly wired through from CLI option (or env var)
to the connection configuration. Commander.js automatically
converts --mother-duck-token to motherDuckToken in the options
object, matching the DuckDBConnectionOptions interface.

Signed-off-by: James Swirhun <[email protected]>
Copy link
Contributor

@mtoy-googly-moogly mtoy-googly-moogly left a comment

Choose a reason for hiding this comment

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

I didn't look super close, this looks mostly OK.

I know it is a pain, but the documentation plan for the cli is that the docs live on the docs site, not here in this repository, so if you want to add docs that is awesome, you need to add them to the docs site, not here.

@jswir
Copy link
Contributor Author

jswir commented Dec 15, 2025

Thank you!

I created malloydata/malloydata.github.io#263 to update official docs on this

jswir added a commit to jswir/malloy-cli that referenced this pull request Dec 15, 2025
Add --mother-duck-token option to create-duckdb command to enable
MotherDuck connections. Addresses feedback from PR malloydata#124.

Changes:
- Add --mother-duck-token flag for MotherDuck API token with
  MOTHERDUCK_TOKEN environment variable support
- Remove -d short option from --database-path to avoid conflict
  with global --debug flag
- Wire motherDuckToken through createDuckDbConnectionCommand
- Add comprehensive test coverage for token option (CLI flag,
  environment variable, and without token)

The token is properly wired through from CLI option (or env var)
to the connection configuration. Commander.js automatically
converts --mother-duck-token to motherDuckToken in the options
object, matching the DuckDBConnectionOptions interface.

Signed-off-by: James Swirhun <[email protected]>
@jswir jswir force-pushed the add-motherduck-support branch from 6bf46fe to 295cf00 Compare December 15, 2025 23:26
jswir added a commit to jswir/malloy-cli that referenced this pull request Dec 15, 2025
Add --mother-duck-token option to create-duckdb command to enable
MotherDuck connections. Addresses feedback from PR malloydata#124.

Changes:
- Add --mother-duck-token flag for MotherDuck API token with
  MOTHERDUCK_TOKEN environment variable support
- Remove -d short option from --database-path to avoid conflict
  with global --debug flag
- Wire motherDuckToken through createDuckDbConnectionCommand
- Add comprehensive test coverage for token option (CLI flag,
  environment variable, and without token)

The token is properly wired through from CLI option (or env var)
to the connection configuration. Commander.js automatically
converts --mother-duck-token to motherDuckToken in the options
object, matching the DuckDBConnectionOptions interface.

Signed-off-by: James Swirhun <[email protected]>
@jswir jswir force-pushed the add-motherduck-support branch from 295cf00 to cdd230b Compare December 15, 2025 23:28
Add --mother-duck-token option to create-duckdb command to enable
MotherDuck connections. Addresses feedback from PR malloydata#124.

Changes:
- Add --mother-duck-token flag for MotherDuck API token with
  MOTHERDUCK_TOKEN environment variable support
- Remove -d short option from --database-path to avoid conflict
  with global --debug flag
- Wire motherDuckToken through createDuckDbConnectionCommand
- Add comprehensive test coverage for token option (CLI flag,
  environment variable, and without token)

The token is properly wired through from CLI option (or env var)
to the connection configuration. Commander.js automatically
converts --mother-duck-token to motherDuckToken in the options
object, matching the DuckDBConnectionOptions interface.

Signed-off-by: James Swirhun <[email protected]>
@jswir jswir force-pushed the add-motherduck-support branch from cdd230b to 8cc97fa Compare December 15, 2025 23:38
@jswir
Copy link
Contributor Author

jswir commented Dec 15, 2025

I also removed the README.md edits from this PR

Copy link
Contributor

@mtoy-googly-moogly mtoy-googly-moogly left a comment

Choose a reason for hiding this comment

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

Thanks for the change LGTM

@mtoy-googly-moogly mtoy-googly-moogly merged commit 299b5e4 into malloydata:main Dec 17, 2025
2 of 3 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.

2 participants