Hi Team, I have an inquiry about how LDMs work in ...
# gooddata-cloud
m
Hi Team, I have an inquiry about how LDMs work in relation to workspaces in Gooddata 1. As far as my understanding goes, we can add two data sources to a workspace, but can we also create two LDMs for a single workspace? 2. Or is it possible to use two LDMs for a workspace at the same time? 3. If we were to put tables from two data sources in the same LDM and connect them in a way that is effectively two LDMs or clusters of connected tables will there be any conflicts in the names of the data fields (table columns) from one cluster to another? 4. And if this is not feasible, how can we use a single workspace in a way where we can utilize the data from two different data sources where the tables have the same structure and fields in the same LDM? Could someone please give me some clarity regarding this? I also have a few more questions related to specifics about the dashboard settings- should I add them here? Thanks
j
Hello Maria, let me address you questions here one by one and hopefully we can reach a solution for your modeling use-case: • As far as my understanding goes, we can add two data sources to a workspace, but can we also create two LDMs for a single workspace? ◦ You can certainly work with two datasources in a single workspace, but only a single LDM can be used in a single workspace. A single LDM is tied to a single workspace. Within a workspace hierarchy, the LDM of a parent workspace is shared with the child workspaces. • Or is it possible to use two LDMs for a workspace at the same time? ◦ No, this is not possible • If we were to put tables from two data sources in the same LDM and connect them in a way that is effectively two LDMs or clusters of connected tables will there be any conflicts in the names of the data fields (table columns) from one cluster to another? • This depends on how you name the fields themselves. Please note that metrics from different sources can only be sliced or filtered using attributes that are references to common dimension datasets and are also Present in each data source involved in the visualization. A fact table can be directly linked to a dataset, but there can only be one data source change in a single path of relationships. • For example: • Country (Snowflake) -> County (BigQuery) -> City (Snowflake) -> Facts (Snowflake) ◦ In this example, the path changes data sources twice (from Snowflake to BigQuery and back to Snowflake), which is not supported. • And if this is not feasible, how can we use a single workspace in a way where we can utilize the data from two different data sources where the tables have the same structure and fields in the same LDM? ◦ Are you saying that essentially there are two LDM's that are identical (names of attributes and facts are the same in each), and you want to combine them? If this is the case, it might get very confusing identifying which facts and attributes you are working with. Ideally, you would want to find a way to keep the naming conventions unique to identify each object. You can find more information on this HERE
m
Hello Joseph, Thank you for answering so thoroughly I think I understand what you're saying about most of this- but let me elaborate on the last point, which is effectively what we want to accomplish here: Are you saying that essentially there are two LDM's that are identical (names of attributes and facts are the same in each), and you want to combine them? Yes, basically there are two LDMs and they have the same names for the column names and tables. But no, we don't want to combine them exactly- the scenario is that we're assigning each workspace to a particular client/subscription within our system -> each subscription is associated with two types of data -> Production and QA -> where both have the same schema in the database, with different data. Now if I'm understanding this right, a single LDM does not automatically work for different data sources, even if the schema is the same- i.e, if datasource-qa has an LDM, if I switch to datasource-prod on that same workspace, the LDM won't apply automatically or won't automatically pick up the data from datasource-prod unless I create another LDM for it. So what I want to know is how to essentially switch the datasource for a workspace while keeping the LDM and stuff the same- since one set of data is for QA, and the other is for production and it doesn't make sense to us to create a different workspace for QA and production for the same client, it seems like it will complicate the deployment process quite a bit.
Ideally, you would want to find a way to keep the naming conventions unique to identify each object. You can find more information on this As for this bit, would it make sense, in the scenario I just described, to put the dataset from QA and Production on the same LDM- but maybe after changing the names of the facts and attributes? Is it possible to do that without altering the actual data fields in the postgres server?
j
This is essentially a postrgres question rather than a gooddata question. You can use datasets from different data sources in an LDM. They can be connected using a common attribute or date dimension datasets. You can change the data source in dataset mapping. You can create visualizations that use multiple metrics from different data sources. These metrics are blended into one common result set using shared conformed dimension attributes. This approach allows you to connect data from multiple sources in real-time, giving you a complete view of your business without the need for complex data movement. In your case, you want to blend two schemas in your postgres. you would essentially connect those schemas in the LDM using the primary key or date dimension.
m
True, but the question is that if the fields in those two schemas are named the same, will that cause conflicts?
j
This shouldn't cause technical conflicts except for when trying to build reports and not being able to identify which name is which.
m
I see, thank you for clarifying