hasura / hasura/graphql-engine
server: support "_like" operator for snowflake
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
Is your proposal related to a problem?
_like operator is not available for selection in query filter for "String" data type column in case of Snowflake source. Unlike other sources like PG, MSSQL or BQ, there are no references of it anywhere explicitly in docs nor do generated GQL API for snowflake source support it when tested in practical.
Describe the solution you'd like
As other sources support it, it would be perfect if there is a support for it added in Snowflake. This way we can also close out "parity gap" between all the sources. Snowflake already supports LIKE operation as mentioned in it's docs here.
Workaround
For one-off temporary solution, we can use Native Queries.
You can prepare an SQL statement which would include usage of like, allow SQL to take input from parameters as args so you can use it in SQL statement and wrap it behind Native Query. Define a logical model for it and then set Native Query's return type to that of Logical Model, and it will be exposed as part of your GraphQL API.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing Snowflake's generated GraphQL filter operators with the equivalent support in the PostgreSQL, MSSQL, or BigQuery sources. Read the Snowflake LIKE documentation and trace where source-specific String operators are exposed and translated. Done means the _like operator is available for Snowflake String columns and is reflected in the generated GraphQL API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100