{"id":668,"date":"2020-04-12T21:39:50","date_gmt":"2020-04-12T21:39:50","guid":{"rendered":"http:\/\/puneetkhosla.com\/?p=668"},"modified":"2021-04-14T05:15:21","modified_gmt":"2021-04-14T05:15:21","slug":"create-a-dataset-with-csv-file","status":"publish","type":"post","link":"https:\/\/puneetkhosla.com\/?p=668","title":{"rendered":"Create a Dataset with CSV file"},"content":{"rendered":"\n<p>Lets start creating the first dataset (you can read more about dataset in my blog on Datasets &#8211; <a rel=\"noreferrer noopener\" href=\"https:\/\/puneetkhosla.com\/?p=661\" target=\"_blank\">Click Here<\/a>) using a CSV file. <\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-bright-blue-color\">STEP 1 : Click on Create Button &amp; Select Dataset<\/span><\/strong><\/p>\n\n\n\n<p>There are multiple ways to start creating a dataset. After entering Analytics Studio, you can either click on the &#8220;<strong><span class=\"has-inline-color has-bright-blue-color\">Create<\/span><\/strong>&#8221; button (on the top right corner) or you can go into your Einstein Analytics app and click the button, etc. Select Dataset.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset-1024x193.png\" alt=\"Create a dataset\" class=\"wp-image-671\" width=\"579\" height=\"108\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset-1024x193.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset-300x56.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset-768x144.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset-1536x289.png 1536w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset-1200x226.png 1200w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset.png 1563w\" sizes=\"(max-width: 579px) 100vw, 579px\" \/><\/figure>\n\n\n\n<p><strong><span class=\"has-inline-color has-bright-blue-color\">STEP 2 : Choose Data Source<\/span><\/strong><\/p>\n\n\n\n<p>Choose CSV File as we are creating dataset from csv.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized is-style-default img-border\"><img decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset2.png\" alt=\"Data Source\" class=\"wp-image-675\" width=\"402\" height=\"314\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset2.png 961w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset2-300x234.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset2-768x599.png 768w\" sizes=\"(max-width: 402px) 100vw, 402px\" \/><\/figure>\n\n\n\n<p><strong><span class=\"has-inline-color has-bright-blue-color\">STEP 3 : Upload the CSV File<\/span><\/strong><\/p>\n\n\n\n<p>Upload \/ Drag and Drop the csv file to upload. Here we are uploading Opportunity Data. I am using the data available in my org (built as part of one of the trailhead modules)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset3-1024x748.png\" alt=\"File to Upload\" class=\"wp-image-691\" width=\"359\" height=\"262\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset3-1024x748.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset3-300x219.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset3-768x561.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset3.png 1150w\" sizes=\"(max-width: 359px) 100vw, 359px\" \/><\/figure>\n\n\n\n<p><strong><span class=\"has-inline-color has-bright-blue-color\">STEP 4 : Define the properties of the Dataset<\/span><\/strong><\/p>\n\n\n\n<p>This is the place to give the name and the App where you want to save the dataset. You can also check the file properties (Auto detected) in case it needs a change. Data Schema file will be covered in later blogs, however the file (also known as Extended Metadata or XMD file) is used for some formatting options of the dataset fields and their values. Click Next button to move to the next step.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset4-1024x757.png\" alt=\"New Dataset\" class=\"wp-image-693\" width=\"454\" height=\"335\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset4-1024x757.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset4-300x222.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset4-768x567.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset4.png 1145w\" sizes=\"(max-width: 454px) 100vw, 454px\" \/><\/figure>\n\n\n\n<p><strong><span class=\"has-inline-color has-bright-blue-color\">STEP 5 : Preview and Edit the Field Attributes<\/span><\/strong><\/p>\n\n\n\n<p>This step now allows you to preview the data being loaded and to change any settings. This is the step where you define the type of column (Dimension, Measure and Date) and set its attribute. By default Einstein Analytics automatically detects the data type but you can change it as well.<\/p>\n\n\n\n<p>In this step, you can check the fields that would be part of the dataset. As we can see we have Account.Name, Amount, CloseDate, Id, etc. as the columns (or fields) of the dataset.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset5.png\" alt=\"Dataset Search Fields\" class=\"wp-image-694\" width=\"342\" height=\"422\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset5.png 554w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset5-243x300.png 243w\" sizes=\"(max-width: 342px) 100vw, 342px\" \/><\/figure>\n\n\n\n<p>You can preview the data getting loaded. Here I have a screen of 3 columns, where we will now make some changes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset6-1024x432.png\" alt=\"Edit Field Attributes\" class=\"wp-image-695\" width=\"468\" height=\"197\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset6-1024x432.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset6-300x127.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset6-768x324.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset6.png 1050w\" sizes=\"(max-width: 468px) 100vw, 468px\" \/><\/figure>\n\n\n\n<p>We have a column as Account.Name. This is because in Opportunity Data, we also extracted Parent Account&#8217;s Name field and in the csv it got extracted as Account.Name. Further to note Analytics Studio automatically picked the field as dimension (qualitative value).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset8.1.png\" alt=\"Dimension Attributes\" class=\"wp-image-698\" width=\"350\" height=\"351\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset8.1.png 406w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset8.1-300x300.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset8.1-150x150.png 150w\" sizes=\"(max-width: 350px) 100vw, 350px\" \/><\/figure>\n\n\n\n<p>You can choose to fix column name in CSV file before loading or you can change the field label in this Step.  So now we will change Account.Name to Account.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset8.2.png\" alt=\"Changing Field Label\" class=\"wp-image-697\" width=\"349\" height=\"210\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset8.2.png 413w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset8.2-300x180.png 300w\" sizes=\"(max-width: 349px) 100vw, 349px\" \/><\/figure>\n\n\n\n<p>The Next field to check is the Amount field. This field is auto-detected as a Measure (value) field as the data in this column is numeric.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset9.png\" alt=\"Measure Field\" class=\"wp-image-701\" width=\"298\" height=\"310\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset9.png 393w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset9-288x300.png 288w\" sizes=\"(max-width: 298px) 100vw, 298px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset10.png\" alt=\"Measure Attributes\" class=\"wp-image-702\" width=\"287\" height=\"435\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset10.png 390w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset10-198x300.png 198w\" sizes=\"(max-width: 287px) 100vw, 287px\" \/><\/figure>\n\n\n\n<p>Since its a currency, we will change the number format to 0.00. Furthermore we will add a grouping symbol and a Decimal Symbol to our data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset11.png\" alt=\"Changing Measure Attributes\" class=\"wp-image-703\" width=\"278\" height=\"415\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset11.png 379w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset11-201x300.png 201w\" sizes=\"(max-width: 278px) 100vw, 278px\" \/><\/figure>\n\n\n\n<p>We will now check the Close Date field. This field is of type Date which has been auto-picked by Einstein Analytics.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset12.png\" alt=\"Date Attributes\" class=\"wp-image-704\" width=\"300\" height=\"439\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset12.png 404w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset12-205x300.png 205w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/figure>\n\n\n\n<p>After doing checks \/ changes to the attributes of the fields, we move to the next step.<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-bright-blue-color\">STEP 6 : Einstein builds Dataset<\/span><\/strong><\/p>\n\n\n\n<p>This is where Einstein Analytics Engine builds the dataset. It can take a few seconds for the while to load. Though I like the page as we can see Mr. Einstein doing the magic.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset13.png\" alt=\"Creating Dataset\" class=\"wp-image-705\" width=\"481\" height=\"331\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset13.png 864w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset13-300x207.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset13-768x529.png 768w\" sizes=\"(max-width: 481px) 100vw, 481px\" \/><\/figure>\n\n\n\n<p><strong><span class=\"has-inline-color has-bright-blue-color\">STEP 7 : Review the prepared Dataset<\/span><\/strong><\/p>\n\n\n\n<p>Once the dataset is loaded, you will automatically get transferred to the dataset page. There you can check your dataset properties and also add Security predicates and XMD file. A good check here is to check the number of rows loaded.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset14-1024x224.png\" alt=\"Dataset\" class=\"wp-image-706\" width=\"540\" height=\"118\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset14-1024x224.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset14-300x66.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset14-768x168.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset14-1536x337.png 1536w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset14-1200x263.png 1200w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset14.png 1857w\" sizes=\"(max-width: 540px) 100vw, 540px\" \/><\/figure>\n\n\n\n<p>You can even the view the dataset data by clicking &#8220;Explore&#8221; button. This opens a Lens where you can add your filters, bars (or the dimension) , bar length (measure or calculation on measure)metc. and choose a chart to display.<\/p>\n\n\n\n<p>I added a filter saying Account contains &#8220;Einstein&#8221;. Bar Length has been kept as Sum of Amount. Bars have been kept as Closed Date (Quarter) and Account (and not Account.Name). Just to add, we only loaded Closed Date, however Einstein Analytics provided us with various groupings like Year, Quarter, Month, Year-Month, Year-Month-Day, etc.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default img-border\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset15-1024x403.png\" alt=\"Lens View\" class=\"wp-image-707\" width=\"554\" height=\"218\" srcset=\"https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset15-1024x403.png 1024w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset15-300x118.png 300w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset15-768x302.png 768w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset15-1536x604.png 1536w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset15-1200x472.png 1200w, https:\/\/puneetkhosla.com\/wp-content\/uploads\/2020\/04\/CreateADataset15.png 1595w\" sizes=\"(max-width: 554px) 100vw, 554px\" \/><\/figure>\n\n\n\n<p>We will soon use this dataset in our dashboard. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lets start creating the first dataset (you can read more about dataset in my blog on Datasets &#8211; Click Here) using a CSV file. STEP 1 : Click on Create Button &amp; Select Dataset There are multiple ways to start creating a dataset. After entering Analytics Studio, you can either click on the &#8220;Create&#8221; button [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[7,21],"tags":[11,12,13,16,22],"class_list":["post-668","post","type-post","status-publish","format-standard","hentry","category-einstein","category-tableau-crm","tag-einstein","tag-einstein-analytics","tag-einstein-discovery","tag-salesforce","tag-tableau-crm"],"_links":{"self":[{"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/posts\/668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=668"}],"version-history":[{"count":23,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/posts\/668\/revisions"}],"predecessor-version":[{"id":713,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=\/wp\/v2\/posts\/668\/revisions\/713"}],"wp:attachment":[{"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/puneetkhosla.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}