Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to connect Tableau to a data source.
Tableau
connection = tableau.connect_to([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'dashboard' because it sounds like the end product.
✗ Incorrect
Tableau connects to a data file or database to start building visualizations.
2fill in blank
mediumComplete the code to specify the data source type in Tableau.
Tableau
data_source = tableau.DataSource(type=[1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing data source type with visualization or filter.
✗ Incorrect
The data source type must be specified as 'excel' or other data formats Tableau supports.
3fill in blank
hardFix the error in the code to establish a live connection in Tableau.
Tableau
connection = tableau.connect_to('database', live=[1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using string 'true' instead of boolean True.
✗ Incorrect
The live parameter must be a boolean True without quotes to enable live connection.
4fill in blank
hardFill both blanks to create a connection and load data in Tableau.
Tableau
connection = tableau.connect_to([1]) data = connection.[2]()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'server' when the example is a file.
Using 'load_data' which is not a Tableau method.
✗ Incorrect
First, connect to a 'file', then fetch() loads the data into Tableau.
5fill in blank
hardFill all three blanks to define a data connection, set live mode, and load data in Tableau.
Tableau
connection = tableau.connect_to([1], live=[2]) data = connection.[3]()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'False' for live mode when live connection is needed.
Using 'load' instead of 'fetch' method.
✗ Incorrect
Connect to a 'database', set live mode to True, then fetch() the data.