Comments (3)
In dbt, the models and sources are not unique so we had to have these prefixes to avoid name collisions. However; we support dbt references so you can access them as follows:
select count(*) from "ref('orders')"
or:
select count(*) from "source('tpch', 'orders')"
Which tool are you using to access Metriql datasets? Maybe we should expose the sources as dbt references, not internal names?
from metriql.
That is true. I explored it a bit with DBeaver now and it doesn't feel super nice with the naming convention currently popping up :) For eg. we only expose a virtual mart to metriql, or for that case all the places actually consuming data, so sources are never exposed outside of DBT. It wouldn't be possible to just give a naming convention for sources so it turns out to be tpch_orders? I feel there must be some sweet solution :)
One more reason is if there is no "automation" ready for a BI Tool, the models(or whatever it's called in each BI Tool) will have really weird names for the end user, instead of actually just showing them what they are looking for.
from metriql.
@AndreasTA-AW actually, we don't expose these names to the BI tools. We use dataset.label
instead of the internal unique id of the datasets. You can override the label in the YML file but the default is the model name as you suggested.
You only see the internal names when you run commands like SHOW TABLES
in a SQL client such as DBeaver. In addition to that, you should access the dataset using the dbt references as I mentioned in my previous message but I agree that it's not convenient to see these internal names even in your SQL client because they're not helpful in terms of navigating the datasets.
What's your suggestion in this case? Should we expose the dbt references such as source('tpch', 'orders')
instead of internal names such as project_name_tpch_orders
? In that case, the models will be exposed as ref('project_name', 'orders')
to avoid name collisions.
The reason why we had to expose the internal names was primarily that the special characters such as (
feels anti-pattern and people might find them confusing but we're always open for feedbacks.
from metriql.
Related Issues (20)
- Installation Error
- maintain column order in CTE when order of selected columns changes in segmentation queries HOT 1
- Invalid query aliases when `materialize` is enabled
- Building Metriql With Local, Proprietary JAR File HOT 1
- How to eliminate double quotes from identifier names in metriql's automatically generated SELECT queries HOT 2
- Support `HAVING (COUNT(1) > 0)` in MQL
- Support for accessing Trino functions in SQL Context not working as expected
- Allow user-supplied names for precomputed tables (roll-up tables) HOT 3
- Unknown data type: Array(String) HOT 1
- unable to compile 0.6-SNAPSHOT HOT 2
- Does not support count_distinct dbt metric type HOT 3
- Metriql cannot find parent models of dbt metrics HOT 2
- Error Date-DateTime column in ClickHouse-Metriql
- Read timed out | socket_timeout does not work
- Repeated Alias HOT 1
- Neo4j support
- dbt 1.3.0 has changed raw_sql to raw_code HOT 1
- how to use pivots propertie?
- Superset Connection HOT 1
- profiles.yml does not exist in /root/.dbt/profiles.yml HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metriql.