querybook icon indicating copy to clipboard operation
querybook copied to clipboard

table_lineage_ids always return null

Open liangjun-jiang opened this issue 3 years ago • 0 comments

I am experimenting Querybook's lineage feature. Particularly, I am interested in this ds/data_job_metadata/ API.

A success response of looking like as following , and the table_lineage_ids always return null, even though lineage is successfully persisted in the database, and the related method here & here has run successfully.

{
    "data": {
        "data_job_metadata_ids": 37,
        "table_lineage_ids": null
    },
    "host": "c83a91196d6d"
}

the complete request is as follows:

curl --location --request POST 'http://localhost:10001/ds/data_job_metadata/' \
--header 'api-access-token: api-token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "job_name": "demo lineage creation 5",
    "job_info": {
            "source": "demo lineage 5"
        },
    "job_owner": "liajiang",
    "query_text": "CREATE TABLE main.tmp_world_happiness_ranking_2015_to_2019_3 AS\nSELECT\n  w5.Country,\n  w5.Region,\n  w5.HappinessRank AS [Rank2015],\n  w6.HappinessRank AS [Rank2016],\n  w7.HappinessRank AS [Rank2017],\n  w8.Rank AS [Rank2018],\n  w9.Rank AS [Rank2019]\nFROM\n  main.world_happiness_2019 w9\n  INNER JOIN main.world_happiness_2018 w8 ON w9.Country = w8.Country\n  INNER JOIN main.world_happiness_2017 w7 ON w9.Country = w7.Country\n  INNER JOIN main.world_happiness_2016 w6 ON w9.Country = w6.Country\n  INNER JOIN main.world_happiness_2015 w5 ON w9.Country = w5.Country;\n",
    "is_adhoc": true,
    "metastore_id": 1
}'

liangjun-jiang avatar Oct 11 '22 18:10 liangjun-jiang