Datahub tableau source extracts lineage from tableau metadata api. It is likely that for the depicted custom sql query, tableau itself could not extract lineage. (Refer
https://help.tableau.com/current/pro/desktop/en-us/customsql.htm#supported-lineage)
Can you confirm if tableau was able to figure out the lineage by trying out below query on
tableau graphiql in your browser. In case, tableau itself couldn't understand lineage, there is nothing much datahub can do at this point. Sometimes, it is possible to rewrite same query in tableau so that tableau can figure out the lineage.
Here is the graphql query you can use to check if tableau could detect upstream tables for custom sql -
https://datahubproject.io/docs/generated/ingestion/sources/tableau/#custom-sql-data-source
Just replace the idWithin filter to use id of your custom sql query. You can locate id of custom sql query from its datahub URN. If URN is this - urn
lidataset:(urn
lidataPlatform:tableau,
4fb670d5-3e19-9656-e684-74aa9729cf18,PROD), the bold part represents id to use for idWithin filter.
Ideally upstreamTables show up in response, if tableau could figure out the lineage.