Not able to union my VDM

Hi,
I have local windows installation of Dremio version “3.1.3-201902130614340856-5cd4808”
I have two virtual VDM with same schema:

  1. AUM_Act4
  2. AUM_Plan4

    both the VDM have exact same column names
    Key,Amount,Period1,Version
    when I try to do Union of these two VDM :
    SELECT Key,Amount,Period1,Version FROM AUM_Plan4
    union
    SELECT Key,Amount,Period1,Version FROM AUM_Act4
    I get an error message stating schemas are different.

Unable to complete query, attempting to union two datasets that have different underlying schemas.
Left: schema(Key::varchar, Amount::double, Period1::union<double, varchar>, version::varchar),
Right: schema(Key::varchar, Amount::double, Period1::varchar, version::varchar

but the schemas are identical, I am not sure what is different here. Can anyone help me here.
Thanks
A.Dinesh

Hi @Dinesh

Can you share the profile with us, will help you with this

Thanks
Venu

Hi,
Check the attached document for the profile,
0b4f68ec-4c46-45e9-a4ed-4e2f00c1c18b.zip (7.2 KB)

I couldn’t get any clue from the profile, if you are able to make any please let me know that to.
Thanks
A.Dinesh

Hi,
Can anyone help me on this issue?

Thanks
Dinesh

Hi @Dinesh,

Apologies for the slow response, let me take a look at the query and get back to you shortly.

@Dinesh, it looks like there are 2 underlying physical datasets (PDS) that this union references:

@dinesh.AUM_Prdct_Plan_Data: in this dataset Period is a Union type (if you look at the dataset you’ll see Abc/#.# next to the column name)

@dinesh.AUM_Prdct_Data: in this dataset Period is a VARCHAR type (if you look at the dataset you’ll see Abc next to the column name)

So they can’t be unioned. Try creating a VDS where you convert Period from @dinesh.AUM_Prdct_Plan_Data to a VARCHAR and see if you can use that in the union

Hi ,
Thanks for the response , let me check that and get back to you .

Thanks & Regards
A.Dinesh