You can translate the question and the replies:

Join condition on delimited files

Hi Team, I want to join 2 views.First view is created from Json file and second view is created from delimited files(Text Files) I need to join both of them on basis of one coloumn. This column can be easily written by specifying view name and then col name followed by dot operator.Like JsonView.SampleId. But this column name is present in key coulmn inside delimited view(Delimited view has always key, value pair ) Means key coulmn has name like sampleId and then Value coulmn has its value. Now challenge is when I am trying to specify this condition on join condition then I could not map key coloumn name of delimited file Like Suppose first View(JsonView) has value like: Sample Id:"XYZ", OrganisationId:"ABC" Second View(Delimited data source view) have following colmns in its view Key Value SampleId "XYZ" MaterialID "ABC" Now I want to join both view on basis of Sample Id.I am writing VQL join condtion like this FROM bv_JsonView AS bv_JsonView INNER JOIN bv_delimitedView AS bv_delimitedView ON bv_JsonView.samplesId= max(case WHEN (bv_delimitedView.key = 'Sample ID') THEN (select bv_delimitedView.value) AS SampleId. Please let me know what mistake I am doing. Thanks in Advance. Neetu Singh
user
17-11-2020 12:30:52 -0500

1 Answer

Hi, For your scenario, you could create a join view with the condition like, ** bv_JsonView.sampleId= bv_delimitedView.value.** I would suggest you to refer to a similar Q&A [here](https://community.denodo.com/answers/question/details?questionId=9064u000000Cf6rAAC&title=Join+condition+on+delimited+files) for more details. Hope this helps!
Denodo Team
26-11-2020 04:20:16 -0500
You must sign in to add an answer. If you do not have an account, you can register here