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
[BUG]: Special characters on column names affects dv query #375
Comments
Used the query source, with a similar As for the example in the docs, I'll add one, thanks for the suggestion. |
I am trying to reproduce your case but it woks fine Could you share your markdown database file? another possibility is that the query does not work itself. try it out of the plugin with a simple
Screen.Recording.2022-09-13.at.18.52.37.mov |
The Dataview query works. This is my Markdown file. `--- database-plugin: basic %% dbfolder:yaml |
The problem here is how is saved. Instead "\"your folder\"". The yaml is saved without the \ Which version of the plugin are you using? |
2.5.3
…On Tue, Sep 13, 2022 at 3:50 PM Rafael Gómez Bermejo < ***@***.***> wrote:
The problem here is how is saved.
Instead "/"your folder/"". The yaml is saved without the /
Which version of the plugin are you using?
—
Reply to this email directly, view it on GitHub
<#375 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHBCRJVAYSNAWJY5RKGQ63V6DLJFANCNFSM6AAAAAAQLNHXOA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
With that version should be saved fine. Hmm Try to modify manually the query property (source_form_result) With "FROM \"2. areas\"" This week I will release a new version with another things, maybe I fixed something about because I can not reproduce it =( thanks for your report |
Hey Rafael, weirdly when I go into the markdown file the source_form_result already is that. Here's a Loom in case I'm doing something wrong: https://www.loom.com/share/28c4830ca3724d7dba140f1ddb6f4cb9 |
I think I have found the problem with your query. The naming of your 2022-Q3 breaks the call. I have to investigate why Try with another naming or rename manually the key,id... of the column less the label The plugin use the id/key to construct the query |
You appear to be correct. Renaming to Q32022 appears to work. Thanks! |
nice! I will check the reason about the problem with |
Interestingly, I still run into the issue with '2022Q3', so I think it might have more to do with the leading year than the dash |
Fixed! will be available with the next version =) export function generateDataviewTableQuery(columns: TableColumn[], fromQuery: string): string {
return `TABLE ${columns
.filter((col) => !col.isMetadata)
.map((col) => `"${col.key}"`) // Added quotes to every column name to fix it
.join(",")},${DatabaseCore.DATAVIEW_FILE},${DatabaseCore.FRONTMATTER_KEY} ${fromQuery}`
} |
Thank you, @RafaelGB, for the wonderful plugin and support! |
okey looks like a bug with the DV api, Your field can not start with a number... Anyway I will release a minor version where you can see on console log "info"lvl the entire query |
Contact Details
brandonkboswell@gmail.com
Present your request
I want to see a query example in the docs when setting up a new database. I am trying to create dashboards for specific folders (without having to have the database in those folders), but I can't seem to get the syntax right or find a good example. I'm trying
FROM "2. areas"
and it says it is valid, but when I go to open the database I get an error obtaining query result, using current folder insteadFor which platform do you request this request??
Desktop
The text was updated successfully, but these errors were encountered: