I would like to have a join between 2 data sources based.
However the “on” fields are of different data type, one is a date type and the other is a string containing timestamp value.
I understood that it is not possible to base the join on calculated field.
I tried to defined the string field as a date one but it returns an error.
@Annab join make tableA.column1 == tableB.column2 in where condition, if your values are not same and not going to be same your join will never work, not in quicksight not in any db.
Depending upon your data-source, you have to use diff approaches to create a new field where that field holds just the date value for a timestamp, and then you can use that for joining.
@neelay This is not accurate, as in SQL I may cast and apply different functions within the join “on” clause.
So, based on your answer, does it mean that the only way for me to overcome this issue is by making the format change on the source data before connecting it to Quicksight?
@ErikG That’s what I was hopping to achieve by using calculated fields (because the formating didn’t work), but it is not applicable on the join fields.
But how do you create the dataset?
One for file 1 and one for file 2 and join into dataset 3?
Because that way you could create a calculated field to get the timestamp into string or date in the base dataset and join in the new dataset.
@Annab The ‘cast’ function is an operation applied to a value prior to matching values. It’s important to note that QuickSight SPICE differs from an RDBMS and may not offer all functionalities present in TSQL. Several solutions have been outlined previously, allowing flexibility to choose the most suitable one for your requirements.
Hi @Annab - Is it possible to share sample data and data types on which you are planning to perform join operation. This will help community replicate the issue and guide you the right solution. The steps provided by @neelay and @ErikG are valid cases and we should use cast or make sure both the field in the QS are of same format before applying the join condition.
Please share sample data so that community can help you.