hasura / hasura/graphql-engine

BigQuery: Logical Models

Open
#9,563 0 comments 0 reactions 2 assignees Claimed by @TheInnerLight View on GitHub
a/data/bigquery k/enhancement public-roadmap t/native-dbs
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

## Feature Description
Introducing Logical Models: A Powerful New Feature Coming Soon to Hasura for BigQuery
_Level up your Hasura experience with Logical Models to create custom GraphQL types without the need for database views or functions._

Hello Hasura enthusiasts!

We're excited to announce a powerful new feature coming soon to Hasura for BigQuery users: Logical Models. This feature will enable you to define custom GraphQL types that don't directly map to a database object, giving you more flexibility and control over your Hasura-generated GraphQL schema. With Logical Models, you'll be able to harness the full power of SQL within Hasura without the need to create database objects that require DDL privileges.

## What are Logical Models?
Logical Models are a new Hasura GraphQL type that doesn't mirror a concrete database object. Instead, when creating a Logical Model, you define native SQL queries to use as a model and map that model to a Hasura GraphQL type. You can also parameterize these queries to pass arguments, allowing you to create custom and dynamic GraphQL types that suit your specific needs.

## Why Logical Models?

This powerful feature empowers you to:
- All workflows currently addressed with views without requiring DML privileges
- Heavily optimized queries
- Complex Aggregations
- GroupBy and Having
- Full Text Search
- Calling stored procedures
- Date math
- Window functions

## User value / outcome
- No requirement for DDL privileges in order to create views,UDFs, or stored procedures
- Leverage Hasura's declarative metadata to streamline CI/CD best practices for your API and underlying data backends

## Current status (design, alpha, beta etc.)
- Alpha (Released)
- Define logical model as metadata and expose it as a custom GraphQL type
- Beta (May'23)
- Parameterized queries
- Relationships
- Console UI Support
- GA
- Permissions

## Resources (e.g. RFCs)
The motivation and design of this feature came in part from the RFC for Parameterized Queries.
[rfc (wip): parameterized queries #7473](https://github.com/hasura/graphql-engine/issues/7473)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.