Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: [email protected]
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Unlock the full potential of AI with Building LLMs for Productionβ€”our 470+ page guide to mastering LLMs with practical projects and expert insights!

Publication

Data Types in Tableau: Using & Cleaning; A Road to Tableau Desktop Specialist Certification
Tutorials

Data Types in Tableau: Using & Cleaning; A Road to Tableau Desktop Specialist Certification

Last Updated on March 24, 2022 by Editorial Team

Author(s): Daksh Trehan

Originally published on Towards AI the World’s Leading AI and Technology News and Media Company. If you are building an AI-related product or service, we invite you to consider becoming an AI sponsor. At Towards AI, we help scale AI and technology startups. Let us help you unleash your technology to the masses.

Chapter 3: A deep dive into Tableau data types &Β metadata

Welcome to the third chapter, In this piece, we are going to learn about accepted Data types in Tableau and how to clean them. In addition, we will have a look at metadata.

If you want to navigate through other chapters, visit: Tableau: What it is? Why it is the best?; A road to Tableau Desktop Specialist Certification.

If you want to directly go on Tableau Desktop Specialist notes, access them here β†’ https://dakshtrehan.notion.site/Tableau-Notes-c13fceda97b94bda940edbf6751cf303

Use the link to get access to free Tableau certification dumps (Valid till 13 AprΒ 2022):

https://www.udemy.com/course/tableau-desktop-specialist-certification-dumps-2022/?couponCode=1FA58837A74561DC1EFB

When users connect to Tableau, the data fields in their data set are automatically assigned a role and aΒ type.

A Role can be of the following twoΒ types:

1) Dimension

2) Measure

(More on Dimensions and Measure in later chapters)

Type can be of the followingΒ :

1) String

2) Number

3) Geographic

4) Boolean

5) Date

6) Date andΒ Time

Table ofΒ Content:

  • Data Types inΒ Tableau
  • Exploring Metadata
  • Modifying Metadata
  • Changing Data Type
    – Changing data type in the source page
    – Changing data type from the data pane
    – Changing data type in theΒ view
  • Handling Mixed DataΒ Types
  • Sample Exam questions from thisΒ topic

Data Types inΒ Tableau

Data is the fuel powering Tableau and every field in our dataset constitutes data that belongs to a generic data type. The data type helps the software to understand the kind of data stored in thatΒ field.

Tableau supports 7 data types. As soon as new data is uploaded, Tableau automatically detects the data type and assigns it to the fields. The data type can also be modified manually once the data is uploaded.

Data Type supported by Tableau,Β Source

String β†’ The β€œstring” data type constitutes zero or more characters enclosed in single or doubleΒ quotes.

e.g. β€œTableau is a BI tool” or β€˜Tableau is a BIΒ tool’.

The string data type can be classified in:

  • Char: In char data type, the value of a string is of fixed length. If we try to load a value of a length greater than the specified length, Tableau throws an error. This data type is used to store alphanumeric dataΒ values.
  • Varchar: Varchar stands for Variable char, the length of characters is flexible here and has no memory allocation restrictions.

Date & Time Values β†’ This data type is used to store dates and times. Tableau can store dates in dd-mm-yy, dd-mm-yyyy, mm-dd-yyyy format.

Some fields only include the date and hence can be stored in date data types. Some fields that store both date and time (more like a timestamp) can be stored in date & time dataΒ type.

The time value can be a decade, year, quarter, month, day, hour, minute, second,Β etc.

If you wish to enter a date in β€œstring” format use β€œ#” before the date. e.g. #14–01–2022 and it will be stored in stringΒ format.

Numerical Values β†’ This data type can contain either float or integer data points. We can also perform manual calculations over them to get a deeper insight into ourΒ data.

Boolean Values β†’ This data is the result of relational calculations and can only contain two values: True orΒ False.

Geographic Values β†’ This data type is represented by the globe and contains the data that can be used in maps. This includes Latitude, Longitude, Country, Cities, Region, Postal Codes,Β etc.

We can convert textual fields to geographic data

We can change the geographical role of a dimension.

There are two Maps availableβ€Šβ€”β€ŠSymbol Map and FilledΒ Map.

The geographic region data type is also aΒ string.

Cluster Groups β†’ Sometimes the data is too rough and represents mixed data types, this is the type of data that is stored in ClusterΒ groups.

Such kind of data can be handled either manually by segregating fields or letting Tableau do itsΒ wonders.

Exploring Metadata

In Tableau, when we connect data to the Start page, we get a data preview where we can check out metadata for eachΒ column.

By default, we can peek at only 1000Β rows.

To explore more about Metadata, click on β€œManage Metadata: β†’

We can get Metadata in the following ordersΒ β†’

The metadata contains β€œField name”, β€œData Type”, β€œTable Name” and β€œRemote Field Name”. The metadata is automatically identified by Tableau and can be further modified manually.

When using the manage metadata option, when we change the name of a field, it is referred to as β€œField name” which was previously referred to as β€œRemote FieldΒ Name”

Modifying Metadata

We can perform the following operations on fields using the β€œManaged Metadata” optionΒ β†’

Tableau can further define its decision(on how it chose which data type this field has) and more about thatΒ field.

Changing DataΒ Types

Tableau automatically defines a data type for each field, but we can also manually challenge its decisions and change the data type for eachΒ field.

This can be done in threeΒ ways:

Changing Data type in the source pageΒ β†’

To change the data type on the source page, go to the preview menu, click on the data type specified for each field, and choose the new dataΒ type.

Changing Data type from Data PaneΒ β†’

The data type can also be changed from the data pane, click on the data type specified for each field, and switch to a new dataΒ type.

Changing Data type in the ViewΒ β†’

To change the data type in the view, right-click on the field, go to β€œChange Data Type” and choose a new dataΒ type.

Handling Mixed DataΒ Types

Sometimes, the columns contain a mix of data types. A column might constitute a mixture of date, date-time, strings, or blank spaces. When we try to connect the data file to Tableau, the mixed column is mapped to a single data type that infiltrates our data i.e. a column which is identified by Tableau as β€œNumerical data type” might also contain dates, strings, or blankΒ spaces.

Tableau considers the top 10000 rows for an Excel File and 1024 rows for CSV files i.e. if we ingest an xlsx file that has 10000 rows and if most of them are of string, then Tableau will regard the whole column as aΒ string.

When Tableau determines a data type for each field, and if the values don’t match that respective data type. Tableau tries to handle that field by adding β€˜null’ values to those records that don’t match the specified dataΒ type.

Source

e.g. In a Boolean mapped column, if there are Text, Dates, or Numbers, those records will be treated asΒ Null.

In Numbers mapped columns, if we get Text it will be treated as Null but if we get a date, it will be converted to the difference of that date from 1/1/1900.

Sample Exam questions from thisΒ Topic

By default how many rows does metadataΒ shows?

  1. 1000
  2. 5000
  3. 100
  4. 10000

Solution: 100

Can we change the geographical role of a dimension?

  1. True
  2. False

Solution: True

When using the manage metadata option, when we change the name of a field, it is referred toΒ as?

  1. Field Name
  2. Remote FieldΒ Name
  3. Name
  4. Field

Solution: FieldΒ Name

Explanation: When using the manage metadata option, when we change the name of a field, it is referred to as β€œField name” which was previously referred to as β€œRemote FieldΒ Name”.

Can we convert textual data to geographic fields?

  1. True
  2. False

Solution: True

Dimensions containing _____ and ______ values can’t be continuous. [Multiple Choice Questions](Choose 2)

  1. Boolean
  2. Date
  3. Date andΒ Time
  4. String

Solution: Boolean andΒ String

Choose the way in which we can change our dataΒ type.

  1. Not possible toΒ change
  2. From dataΒ source
  3. From dataΒ pane
  4. From the data source and data paneΒ both

Solution: From Data Source & Data PaneΒ both

Use the link to get access to free Tableau certification dumps (Valid till 13 AprΒ 2022):

https://www.udemy.com/course/tableau-desktop-specialist-certification-dumps-2022/?couponCode=1FA58837A74561DC1EFB

References:

[1] Tableau Help | TableauΒ Software

[2] PersonalΒ Notes

[3]Tableau Desktop Specialist Exam (New Patternβ€Šβ€”β€Š2021)β€Šβ€”β€ŠApisero

Thanks forΒ Reading!

Feel free to give claps so I know how helpful this post was for you, and share it on your social networks, this would be very helpful forΒ me.

If you like this article and want to learn more about Machine Learning, Data Science, Python, BI. Please consider subscribing to my newsletter:

Daksh Trehan’s Newsletter.

Find me on Web: www.dakshtrehan.com

Connect with me at LinkedIn: www.linkedin.com/in/dakshtrehan

Read my Tech blogs: www.dakshtrehan.medium.com

Connect with me at Instagram: www.instagram.com/_daksh_trehan

Want to learnΒ more?

How is YouTube using AI to recommend videos?
Detecting COVID-19 Using Deep Learning
The Inescapable AI Algorithm: TikTok
GPT-3 Explained to a 5-year old.
Tinder+AI: A perfect Matchmaking?
An insider’s guide to Cartoonization using Machine Learning
How Google made β€œHum to Search?”
One-line Magical code to perform EDA!
Give me 5-minutes, I’ll give you a DeepFake!

Cheers


Data Types in Tableau: Using & Cleaning; A Road to Tableau Desktop Specialist Certification was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

Join thousands of data leaders on the AI newsletter. It’s free, we don’t spam, and we never share your email address. Keep up to date with the latest work in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming aΒ sponsor.

Published via Towards AI

Feedback ↓