{"id":4716,"date":"2020-04-15T18:59:23","date_gmt":"2020-04-15T18:59:23","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=4716"},"modified":"2022-03-22T10:31:22","modified_gmt":"2022-03-22T10:31:22","slug":"importing-data-google-professional-data-engineer-gcp","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/","title":{"rendered":"Importing Data Google Professional Data Engineer GCP"},"content":{"rendered":"\n<p>In this, we will learn the concept of importing data.<\/p>\n\n\n<ul>\n<li>To import data from Cloud Storage, the instance&#8217;s service account must have the legacyBucketReader Cloud IAM role set in the project.<\/li>\n<li>Import as SQL dump file or CSV for MySQL and PostgreSQL and for SQL Server option of BAK file is present<\/li>\n<li>Importing the SQL dump file \/ BAK file or CSV file to CloudSQL from console, as REST or use gcloud<\/li>\n<li>Import can be done by sql dump or csv.<\/li>\n<li>Sql dump cannot contain triggers, views, stored procedures.<\/li>\n<\/ul>\n<h6><strong>Importing SQL dump files to Cloud SQL<\/strong><\/h6>\n<ul>\n<li>Do not use a system user (such as root@localhost) as the DEFINER for triggers, view, or stored procedures. You won&#8217;t have access to this user in Cloud SQL.<\/li>\n<li>The database you are importing into must already exist on Cloud SQL instance and it must be empty. You can&#8217;t overwrite existing data.<\/li>\n<li>The SQL Mode setting affects how Cloud SQL interprets SQL queries.<\/li>\n<li>Create a Cloud Storage bucket and upload the file to the bucket.<\/li>\n<li>Select the instance in the Cloud SQL Instances page in the Google Cloud Console.<\/li>\n<li>Click Import in the button bar.<\/li>\n<li>Enter the path to the bucket and SQL dump file<\/li>\n<li>For Format, select SQL.<\/li>\n<li>Select the database you want the data to be imported into.<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p><strong>Using gcloud Steps<\/strong><\/p>\n<ul>\n<li>Create a Cloud Storage bucket, if you haven&#8217;t already.<\/li>\n<li>Upload the file to bucket.<\/li>\n<li>Describe the instance you are importing to: gcloud sql instances describe [INSTANCE_NAME]<\/li>\n<li>Copy the serviceAccountEmailAddress field.<\/li>\n<li>Use gsutil IAM to grant the legacyBucketWriter and objectViewer Cloud IAM roles to the service account for the bucket.<\/li>\n<li>Import the database: gcloud sql import sql [INSTANCE_NAME] gs:\/\/[BUCKET_NAME]\/[IMPORT_FILE_NAME] \\<\/li>\n<\/ul>\n<p>&#8211;database=[DATABASE_NAME]\n<ul>\n<li>If the command returns an error like `ERROR_RDBMS`, review the permissions; this error is often due to permissions issues.<\/li>\n<\/ul>\n\n\n<p><strong><a href=\"https:\/\/www.testpreptraining.ai\/certified-professional-data-engineer-practice-exam\" target=\"_blank\" rel=\"noreferrer noopener\">Pass the GCP Data Engineer Exam Now!<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this, we will learn the concept of importing data. To import data from Cloud Storage, the instance&#8217;s service account must have the legacyBucketReader Cloud IAM role set in the project. Import as SQL dump file or CSV for MySQL and PostgreSQL and for SQL Server option of BAK file is present Importing the SQL&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[617],"tags":[655,657,619,623,622,618,621],"class_list":["post-4716","page","type-page","status-publish","hentry","category-google-gcp","tag-cloud-sql","tag-cloud-sql-importing-data","tag-data-engineer","tag-gcp","tag-google-certification","tag-google-cloud","tag-professional-data-engineer"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Importing Data Google Professional Data Engineer GCP<\/title>\n<meta name=\"description\" content=\"Upgrade your skills level for passing the Google Professional Data Engineer exa, by learning the concepts of importing data Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Importing Data Google Professional Data Engineer GCP\" \/>\n<meta property=\"og:description\" content=\"Upgrade your skills level for passing the Google Professional Data Engineer exa, by learning the concepts of importing data Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-22T10:31:22+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/\",\"name\":\"Importing Data Google Professional Data Engineer GCP\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2020-04-15T18:59:23+00:00\",\"dateModified\":\"2022-03-22T10:31:22+00:00\",\"description\":\"Upgrade your skills level for passing the Google Professional Data Engineer exa, by learning the concepts of importing data Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Importing Data Google Professional Data Engineer GCP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Importing Data Google Professional Data Engineer GCP","description":"Upgrade your skills level for passing the Google Professional Data Engineer exa, by learning the concepts of importing data Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/","og_locale":"en_US","og_type":"article","og_title":"Importing Data Google Professional Data Engineer GCP","og_description":"Upgrade your skills level for passing the Google Professional Data Engineer exa, by learning the concepts of importing data Now!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2022-03-22T10:31:22+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/","name":"Importing Data Google Professional Data Engineer GCP","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2020-04-15T18:59:23+00:00","dateModified":"2022-03-22T10:31:22+00:00","description":"Upgrade your skills level for passing the Google Professional Data Engineer exa, by learning the concepts of importing data Now!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/importing-data-google-professional-data-engineer-gcp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Importing Data Google Professional Data Engineer GCP"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/4716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=4716"}],"version-history":[{"count":4,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/4716\/revisions"}],"predecessor-version":[{"id":53335,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/4716\/revisions\/53335"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=4716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=4716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=4716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}