-
Notifications
You must be signed in to change notification settings - Fork 233
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
Problem with generator stament #214
Comments
Sorry for the late reply, been really busy recently. GENERATOR is special from other table names. As you can see, usually table name is parsed as Identifier(https://en.wikipedia.org/wiki/Identifier_(computer_languages)). You can think of identifier as string literal. here we have a Parenthesis, which is clearly not a string literal. I see what generator is doing in snowflake. So what's your expected output here? Reference for myself: https://docs.snowflake.com/en/sql-reference/functions/generator.html |
Apologies for being late, also been busy.
|
Yeah, thanks for explaining, I understand the GENERATOR expression and your use case now. The thing I'm more interested to know is what would you expect sqllineage to return for this syntax. A source table named 'GENERATOR', or 'GENERATOR(ROWCOUNT => ($NUM_HOURS))'? Or should we create another class for this, like we did previous for Path? |
This is a contribed example of something I'm trying to do using Snowflake sql (where this query works correctly):
SELECT 'HELLO' AS FEATURE FROM TABLE (GENERATOR(ROWCOUNT => (24))))
This is the error message I get
SQLLineageException: An Identifier is expected, got Token[value: )] instead
from the sqllineage heroku app I get this somewhat more specific message
An Identifier is expected, got Parenthesis[value: (GENERATOR(ROWCOUNT => (24)))] instead
I'm using sqllineage version 1.2.4
The text was updated successfully, but these errors were encountered: