-
Notifications
You must be signed in to change notification settings - Fork 94
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
[SL-2418] [Bug] Missing column names when writing a query to CSV #1285
Labels
bug
Something isn't working
High priority
Created by Linear-GitHub Sync
Low
Created by Linear-GitHub Sync
Metricflow
Created by Linear-GitHub Sync
starter task
Created by Linear-GitHub Sync
triage
Tasks that need to be triaged
Comments
Jstein77
changed the title
[Bug] Missing column names when writing query re
[SL-2418] [Bug] Missing column names when writing query re
Jun 14, 2024
Jstein77
changed the title
[SL-2418] [Bug] Missing column names when writing query re
[SL-2418] [Bug] Missing column names when writing query to CSV
Jun 14, 2024
Jstein77
changed the title
[SL-2418] [Bug] Missing column names when writing query to CSV
[SL-2418] [Bug] Missing column names when writing a query to CSV
Jun 14, 2024
Jstein77
added
High priority
Created by Linear-GitHub Sync
Metricflow
Created by Linear-GitHub Sync
labels
Jun 27, 2024
Hey @Jstein77, would it be fine if I pick this up? |
tlento
pushed a commit
that referenced
this issue
Jul 16, 2024
# Issue #1285 The CSV exported from the `mf query <metric> --csv <csv-file-name>` command does not contain the column header. The CSV thus does not make too much sense. # Fix - The code [here](https://github.com/dbt-labs/metricflow/blob/main/dbt-metricflow/dbt_metricflow/cli/main.py#L344) is writing data to the CSV file. The column names aren't getting added to the file. - With this PR, we are adding the column names returned from `df.column_names` to the CSV to fix the issue.
tlento
pushed a commit
that referenced
this issue
Jul 26, 2024
# Issue #1285 The CSV exported from the `mf query <metric> --csv <csv-file-name>` command does not contain the column header. The CSV thus does not make too much sense. # Fix - The code [here](https://github.com/dbt-labs/metricflow/blob/main/dbt-metricflow/dbt_metricflow/cli/main.py#L344) is writing data to the CSV file. The column names aren't getting added to the file. - With this PR, we are adding the column names returned from `df.column_names` to the CSV to fix the issue.
tlento
added a commit
that referenced
this issue
Jul 27, 2024
…1354) This commit is a backport of PR #1313 to dbt-metricflow 0.7.x This will allow us to deploy @saurabh0402's fix for the following issue: #1285 Note - efficacy was tested via the CLI by running hatch build and doing a pip install of the build package into a clean VM, and running `mf query` with the `--csv` flag enabled. Co-authored-by: Saurabh Kumar <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
High priority
Created by Linear-GitHub Sync
Low
Created by Linear-GitHub Sync
Metricflow
Created by Linear-GitHub Sync
starter task
Created by Linear-GitHub Sync
triage
Tasks that need to be triaged
Is this a new bug in metricflow?
Current Behavior
When I run
mf query --metrics revenue --group-by metric_time__week --csv test
the csv result does not include the metric or dimension names.The first for rows for test.csv are:
Expected Behavior
I expect the first row of the CSV to be the metrics and dimensions in my query
Steps To Reproduce
mf query --metrics revenue_offset --group-by metric_time__week --csv test
Relevant log output
No response
Environment
Which database are you using?
No response
Additional Context
No response
SL-2418
The text was updated successfully, but these errors were encountered: