-
1. Re: Tableau Not Showing all Columns from MS SQL Server 2012
Ken FlerlageMay 8, 2018 5:16 PM (in response to Stephen Morrell)
I don't know this for sure, but my guess is that Tableau is unable to handle the sql_variant data type. Is there a specific reason you're using this data type? Could you try a different data type?
-
2. Re: Tableau Not Showing all Columns from MS SQL Server 2012
Stephen Morrell May 8, 2018 6:52 PM (in response to Stephen Morrell)Unfortunately this Table is a part of an "out of box" database we use and can't change the field settings. This field is actually a user input field that stores values of custom fields we define. These Values are what we need to measure metrics on, but as you can see it's not coming through.
-
3. Re: Tableau Not Showing all Columns from MS SQL Server 2012
Ken FlerlageMay 9, 2018 5:16 AM (in response to Stephen Morrell)
1 of 1 people found this helpfulStephen, please take a look at the following: Support for SQL_Variant data type
The solution to this is to use custom SQL and cast the sql_variant to another data type. Your custom query would look something like this:
SELECT
IssueID,
FieldID,
CAST(Value as <target data type>) as Value,
OptionID
FROM dbo.hdCustomFieldValues
-
4. Re: Tableau Not Showing all Columns from MS SQL Server 2012
Stephen Morrell May 9, 2018 5:45 AM (in response to Ken Flerlage)This worked Perfect!!!!! Thank you!
-
5. Re: Tableau Not Showing all Columns from MS SQL Server 2012
Ken FlerlageMay 9, 2018 10:24 AM (in response to Stephen Morrell)
Great!!
-
6. Re: Tableau Not Showing all Columns from MS SQL Server 2012
ChicagoTableauUser Apr 4, 2019 2:47 PM (in response to Ken Flerlage)Hi Ken,
I have this same issue. What do I put in <target data type>? I want a string of text but NVARCHAR doesn't work.
Thanks
SELECT
IssueID,
FieldID,
CAST(Value as <target data type>) as Value,
OptionID
FROM dbo.hdCustomFieldValues
-
7. Re: Tableau Not Showing all Columns from MS SQL Server 2012
Ken FlerlageApr 4, 2019 3:38 PM (in response to ChicagoTableauUser)
Did you specify a length for your nvarchar? You'd need to do something like nvarchar(100)