{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Google Business Profile Import Integration Using The CLI","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"google-business-profile-import-integration-using-the-cli","__idx":0},"children":["Google Business Profile Import Integration Using The CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can import customer information using Google Business Profile(formerly Google My Business) import integration. With this connector, you can consolidate statistics, including ratings and reviews, of all your locations. If you are interested in participating in the Google Business Profile beta, contact your Treasure Data Customer Success representative."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Google Business Profile account (",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.google.com/business/"},"children":["www.google.com/business"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Complete prerequisite list from ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/my-business/content/prereqs"},"children":["Google Business Profile Prerequisites"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Treasure Data, including",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["Treasure Data Toolbelt"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"install-td-command","__idx":2},"children":["Install ‘td’ Command"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Install the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/td-toolbelt"},"children":["Treasure Data Toolbelt"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-config-file-loadyml","__idx":3},"children":["Create Config File (load.yml)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-accounts","__idx":4},"children":["For Accounts:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n    type: google_business_profile\n    client_id: my-client-id\n    client_secret: secret\n    refresh_token: token\n    data_type: accounts\n\nfilters:\n    type: add_time\n  - from_value: {mode: upload_time}\n    to_column: {name: time}\n\nout: {mode: append}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-locations","__idx":5},"children":["For Locations:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n    type: google_business_profile\n    client_id: my-client-id\n    client_secret: secret\n    refresh_token: token\n    data_type: locations\n\nfilters:\n    type: add_time\n  - from_value: {mode: upload_time}\n    to_column: {name: time}\n\nout: {mode: append}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-location-reviews","__idx":6},"children":["For Location Reviews:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n    type: google_business_profile\n    client_id: my-client-id\n    client_secret: secret\n    refresh_token: token\n    data_type: location_reviews\n\nfilters:\n    type: add_time\n  - from_value: {mode: upload_time}\n    to_column: {name: time}\n\nout: {mode: append}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-location-daily-metrics-time-series","__idx":7},"children":["For Location Daily Metrics Time Series:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n    type: google_business_profile\n    client_id: my-client-id\n    client_secret: secret\n    refresh_token: token\n    data_type: location_daily_metrics_time_series\n    daily_metric: BUSINESS_IMPRESSIONS_DESKTOP_MAPS\n    start_time: \"2014-10-02\"\n    end_time: \"2014-10-03\"\n    incremental: true\n\nfilters:\n    type: add_time\n  - from_value: {mode: upload_time}\n    to_column: {name: time}\n\nout: {mode: append}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-location-monthly-search-keywords-impressions","__idx":8},"children":["For Location Monthly Search Keywords Impressions:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n    type: google_business_profile\n    client_id: my-client-id\n    client_secret: secret\n    refresh_token: token\n    data_type: location_monthly_search_keywords_impressions\n    start_time: \"2014-10-02\"\n    end_time: \"2014-10-03\"\n\nfilters:\n    type: add_time\n  - from_value: {mode: upload_time}\n    to_column: {name: time}\n\nout: {mode: replace}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configuration keys and descriptions are as follows:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Config key"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Required"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OAuth client_id."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OAuth client_secret."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["refresh_token"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OAuth refresh_token uses to exchange access_token."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["data_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type of data you want to import: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["location_reviews"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accounts"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locations, location_daily_metrics_time_series or location_monthly_search_keywords_impressions"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["daily_metric"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values are (only required for location_daily_metrics_time_series data type):  BUSINESS_IMPRESSIONS_DESKTOP_MAPS,   BUSINESS_IMPRESSIONS_DESKTOP_SEARCH,   BUSINESS_IMPRESSIONS_MOBILE_MAPS,   BUSINESS_IMPRESSIONS_MOBILE_SEARCH,   BUSINESS_CONVERSATIONS,   BUSINESS_DIRECTION_REQUESTS,   CALL_CLICKS,   WEBSITE_CLICKS,   BUSINESS_BOOKINGS,   BUSINESS_FOOD_ORDERS"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["start_time"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["- ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Location Daily Metrics Time Series"]},": Start time with format YYYY-MM-DD, e.g.: 2022-10-10 for report time range inclusive. - ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Location Monthly Search Keywords Impressions"]},": Start time with format YYYY-MM, e.g.: 2022-10-10 for report time range inclusive"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["end_time"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["- ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Location Daily Metrics Time Series"]},": End time with format YYYY-MM-DD, e.g.: 2022-10-10 for report time range inclusive. - ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Location Monthly Search Keywords Impressions"]},": End time with format YYYY-MM, e.g.: 2022-10-10 for report time range inclusive"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["incremental"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether import should be incremental or not."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["retry_limit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["maximum retry times for each API call. Default: 7"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["initial_retry_wait"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["wait time for first retry. Default: 5 seconds"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["max_retry_wait"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["maximum time between retries. Default: 300 seconds"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"execute-load-job","__idx":9},"children":["Execute Load Job"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Submit the load job. It may take a couple of hours depending on the data size. Users need to specify the database and table where their data is stored."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample_table\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The preceding command assumes that you have already created ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["database(td_sample_db)"]}," and ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["table(td_sample_table)"]},". If the database or the table do not exist in TD, this command will not succeed, so create the database and table ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/data-management"},"children":["manually"]}," or use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--auto-create-table"]}," option with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:issue"]}," command to automatically create the database and table as follows."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample_table --time-column created_at --auto-create-table \n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can assign Time Format column to the \"Partitioning Key\" by using the --time-column option."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"scheduled-execution","__idx":10},"children":["Scheduled Execution"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can schedule periodic data connector execution for periodic data import. We carefully configure our scheduler to ensure high availability. By using this feature, you no longer need a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cron"]}," daemon on your local data center."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-the-schedule","__idx":11},"children":["Create the Schedule"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A new schedule can be created by using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:create"]}," command. The name of the schedule, cron-style schedule, the database and table where their data is stored, and the data connector configuration file are required."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:create \\\n    daily_report_import \\\n    \"10 0 * * *\" \\\n    td_sample_db \\\n    td_sample_table \\\n    load.yml \n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cron"]}," parameter also accepts three special options: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@hourly"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@daily"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@monthly"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"list-the-schedules","__idx":12},"children":["List the Schedules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can see the list of scheduled entries by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:list"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:list\n+---------------------------+--------------+----------+-------+--------------+-----------------+-------------------------------------+\n| Name                      | Cron         | Timezone | Delay | Database     | Table           | Config                              |\n+---------------------------+--------------+----------+-------+--------------+-----------------+-------------------------------------+\n|daily_report_import        | 10 0 * * *   | UTC      | 0     | td_sample_db | td_sample_table | {\"type\"=>\"google_business_profile\",...   |\n+---------------------------+--------------+----------+-------+--------------+-----------------+-------------------------------------+\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"show-the-setting-and-history-of-schedules","__idx":13},"children":["Show the Setting and History of Schedules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:show"]}," shows the execution setting of a schedule entry."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:show daily_report_import\nName     :daily_report_import\nCron     : 10 0 * * *\nTimezone : UTC\nDelay    : 0\nDatabase : td_sample_db\nTable    : td_sample_table\nConfig\n---\n// Displayed load.yml configuration.\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:history"]}," shows the execution history of a schedule entry. To investigate the results of each individual execution, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td job jobid"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"delete-the-schedule","__idx":14},"children":["Delete the Schedule"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:delete"]}," removes the schedule."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:delete daily_report_import  \n"},"children":[]}]},"headings":[{"value":"Google Business Profile Import Integration Using The CLI","id":"google-business-profile-import-integration-using-the-cli","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Install ‘td’ Command","id":"install-td-command","depth":2},{"value":"Create Config File (load.yml)","id":"create-config-file-loadyml","depth":2},{"value":"For Accounts:","id":"for-accounts","depth":3},{"value":"For Locations:","id":"for-locations","depth":3},{"value":"For Location Reviews:","id":"for-location-reviews","depth":3},{"value":"For Location Daily Metrics Time Series:","id":"for-location-daily-metrics-time-series","depth":3},{"value":"For Location Monthly Search Keywords Impressions:","id":"for-location-monthly-search-keywords-impressions","depth":3},{"value":"Execute Load Job","id":"execute-load-job","depth":2},{"value":"Scheduled Execution","id":"scheduled-execution","depth":1},{"value":"Create the Schedule","id":"create-the-schedule","depth":2},{"value":"List the Schedules","id":"list-the-schedules","depth":2},{"value":"Show the Setting and History of Schedules","id":"show-the-setting-and-history-of-schedules","depth":2},{"value":"Delete the Schedule","id":"delete-the-schedule","depth":2}],"frontmatter":{"seo":{"title":"Google Business Profile Import Integration Using The CLI"}},"lastModified":"2026-01-27T10:05:25.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/google-business-profile-import-integration-using-the-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}