Skip to content

Surprise! Field aliases! #54

@cnagel-wti

Description

@cnagel-wti

I imported a wide file and ran a query against it, but kept getting errors of the form <fieldname> is not defined. After reading through the output more carefully, I realized RBQL had assigned prefixed names to the header fields, so for example employeeid appeared as something like a5:employeeid.

That surprised me, because I expected to be able to reference the header names directly. Instead, I had to stop and figure out what the prefixes meant, map them back to the original columns, and then rewrite the query. In practice, that added a fair amount of friction to what seemed like a straightforward operation.

What I eventually learned is that the query needed to use syntax such as SELECT a1, a2, a3 WITH (header). From a new user’s perspective, that is not obvious at all, especially when the file already has meaningful column names.

I would genuinely like to understand the design decision here. Are there technical constraints that make these prefixed aliases necessary? If so, it would help to explain them more prominently in the documentation, because this behavior was quite unexpected and not something I would have guessed in advance.

I assume there are implementation details and edge cases I am not seeing, so I am asking partly out of frustration, but also out of a real desire to understand the reasoning.

I will say, kudos on keeping the query in play while I figured this out! I was able to submit several iterations of the query and when I finally got it right, it ran and output the file perfectly.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions