3
votes

How to get YouTube channel page id for creating Google BigQuery Data Transfer Service YouTube Channel as data source.

Trying to create transfer service from BQ console and CLI. Getting the following error from console and CLI.

Now I am using the pageId from this YouTube Channel URL: https://www.youtube.com/channel/XXXXXXXXXYYYYYYYYYY

From CLI:

bq mk --transfer_config --project_id=test-dts --target_dataset=YTChannelDTS --display_name='YTChannelTest' --params='{"page_id":"XXXXXXXXXYYYYYYYYYY","table_suffix":"MT","configure_jobs":"true"}' --data_source='youtube_channel'

BigQuery error in mk operation: Request contains an invalid argument.

From Console: refer the below image(error marked in red colour).

enter image description here

2

2 Answers

3
votes

Navigate to https://www.youtube.com/account_advanced in order to see your YouTube account settings. You will then see a value for YouTube Channel ID. This is what you pass to BigQuery.

Update: After trying to replicate the above steps on a project that I was the Owner on, I encountered the same error message. The workaround was to:

  • Go to the IAM admin page
  • Select the project that will be housing your data transfer BigQuery dataset
  • Find your account
  • Add the BigQuery Admin privilege to your account
  • Retry the steps to set up your data transfer
2
votes

Besides "Channel page ID", the help button says that it needs "The page ID of the Google+ page associated with the channel." You can get it by visiting Google plus and then clicking on profile. The pageID will get appended to the URL:

https://plus.google.com/< pageID >

I cannot fully test this because I have just set up a reporting job and it can take up to 48 hours to get created so, for me, right now it fails with a "No reporting jobs found - please ensure that reporting jobs exist." but it looks that the transfer itself was created correctly.

On a side note, Gplus will soon be discontinued for personal accounts so, for such transfers to still work after April 2 on such accounts, I think you'll probably need to "Move channel to Brand Account". This option can be found under Account settings