Team, Is there any way i can refer WDF in the sql ...
# gooddata-cloud
a
Team, Is there any way i can refer WDF in the sql query which i write in LDM?
k
When creating an SQL dataset in the LDM, you don't directly "reference" the WDF column in a special way — but there is a specific requirement and approach to make WDFs work with SQL datasets: The SQL query must return the WDF column If you're using a
wdf__<columnBaseName>
column to define a Workspace Data Filter, your SQL query that defines the dataset must include and return that column in its
SELECT
statement. [Create SQL Dataset] For example, if your WDF is based on a column named
wdf__tenant_id
, your SQL dataset query should look something like:
Copy code
SELECT
  id,
  name,
  wdf__tenant_id,
  -- other columns
FROM your_table
Key things to know: • Using the
wdf__
prefix on a column prevents GoodData from generating regular dataset objects (facts or attributes) from that column — it won't be visible or usable in analytics directly. It only serves the WDF purpose. [How Workspace Data Filters Work] • The data modeler will automatically create mapping rules between the dataset and the WDF if the SQL query returns a column defined in the WDF. This eliminates the need for manual rule creation (but only applies when creating a new dataset). [How Workspace Data Filters Work] • WDFs do not propagate across LDM connections — if you need filtering on multiple datasets, each dataset must have the WDF column mapped individually. [Create SQL Dataset] So in summary: include the
wdf__
prefixed column in your SQL
SELECT
query, and GoodData will handle the rest of the WDF mapping automatically. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups. 👀 Our Support team monitors all messages and will jump in if needed.
a
Example : I have array of organization_Id and in sql query i write give me the details only if organization_Id = WDF_organization_Id
j
Hi Anjali, I'm afraid that this isn't possible. However, I'm curious what would be the use-case for that? Can you please provide more context?
j
Hi Anijali, We just wanted to follow up and see if you could provide more detials for the use-case here.