Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update --dimensions to --group-by in cli examples #5209

Closed
wants to merge 5 commits into from

Conversation

MiConnell
Copy link
Contributor

What are you changing in this pull request and why?

Both mf query and dbt sl query error out when passing the --dimensions flag (Error: No such option: --dimensions). Both help texts show --group-by as the flag to use to pass dimensions.

mf query --help                                                                                   
Usage: mf query [OPTIONS]

  Create a new query with MetricFlow and assembles a MetricFlowQueryResult.

Options:
  --metrics SEQUENCE       Metrics to query for: syntax is --metrics bookings
                           or for multiple metrics --metrics bookings,messages
  --group-by SEQUENCE      Dimensions and/or entities to group by: syntax is
                           --group-by ds or for multiple group bys --group-by
                           ds,org
  --end-time TEXT          Optional iso8601 timestamp to constraint the end
                           time of the data (inclusive)
  --start-time TEXT        Optional iso8601 timestamp to constraint the start
                           time of the data (inclusive)
  --where TEXT             SQL-like where statement provided as a string. For
                           example: --where "revenue > 100"
  --limit TEXT             Limit the number of rows out using an int or leave
                           blank for no limit. For example: --limit 100
  --order SEQUENCE         Metrics or group bys to order by ("-" prefix for
                           DESC). For example: --order -ds or --order
                           ds,-revenue
  --csv FILENAME           Provide filepath for dataframe output to csv
  --explain                In the query output, show the query that was
                           executed against the data warehouse
  --show-dataflow-plan     Display dataflow plan in explain output
  --display-plans          Display plans (e.g. metric dataflow) in the browser
  --decimals INTEGER       Choose the number of decimal places to round for
                           the numerical values
  --show-sql-descriptions  Shows inline descriptions of nodes in displayed SQL
  --saved-query TEXT       Specify the name of the saved query to use for
                           applicable parameters
  --help                   Show this message and exit.
dbt sl query --help
Make a query against your semantic layer.

Usage:
  dbt sl query [flags]

Flags:
      --compile              Show the compiled SQL query (does not execute query against data warehouse).
      --group-by strings     Dimensions and/or entities to group by: syntax is --group-by metric_time or for multiple group bys --group-by metric_time,org
  -h, --help                 help for query
      --limit int            Limit the number of rows out using an int (default: 100, max: 1024). For example: --limit 1000 (default 100)
      --metrics strings      Metrics to query for: syntax is --metrics bookings or for multiple metrics --metrics bookings,messages
      --order-by strings     Metrics or group bys to order by ("-" prefix for DESC). For example: --order -metric_time or --order metric_time,-revenue
      --saved-query string   Specify the name of the saved query to use for querying
      --where string         A where clause that allows you to filter on dimensions and entities using parameters. Example: --where "{{ where=Dimension('customer__country') }} = 'US')"

Global Flags:
      --log-format LogFormat   The log format, either json or plain. (default plain)
      --log-level LogLevel     The log level, one of debug, info, warning, error or fatal. (default info)
      --no-color               Disables colorization of the output.

Checklist

@MiConnell MiConnell requested a review from a team as a code owner April 1, 2024 23:58
Copy link

vercel bot commented Apr 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2024 8:17pm

@github-actions github-actions bot added content Improvements or additions to content size: small This change will take 1 to 2 days to address labels Apr 1, 2024
@mirnawong1
Copy link
Contributor

Hey @MiConnell thanks so much for opening this up and flagging this! I'm also going to loop in @Jstein77 so he's aware too! Jordan, I'm happy to review this PR on my end, let me know if there's any other changes I should consider.

@github-actions github-actions bot added size: x-small This change will take under 3 hours to fix. and removed size: small This change will take 1 to 2 days to address labels Aug 5, 2024
@matthewshaver
Copy link
Contributor

Closing as this was fixed in a separate ticket. Thank you @MiConnell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content size: x-small This change will take under 3 hours to fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants