3

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

Brisi
  • 1,781
  • 7
  • 26
  • 41

3 Answers3

3

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
vinoaj
  • 1,600
  • 10
  • 8
  • Thanks @vinoaj! The same Id(Youtube channel Id) returns from this url as well https://www.youtube.com/channel/XXXXXXXXXYYYYYYYYYY. I have tried to create a bigquery DTS using this channel Id but it failed with the above mentioned error. – Brisi Mar 19 '19 at 04:34
  • 1
    @brisk I went through the steps with my own YouTube channel and encountered the same issue as you. What I found worked, was I had to go into the IAM settings for the project and grant myself the BigQuery Admin role, even though I am already an owner of the project. Seems like a bug, but this is the workaround! – vinoaj Mar 20 '19 at 09:33
  • Already tried with the BQ Admin and Owner role for myself(GCP). Got the same error only. – Brisi Apr 03 '19 at 07:32
2

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

Mar Cial R
  • 936
  • 9
  • 20
  • Thanks @Mar Cial R. I have tried google plus before to get pageId but it returns none. So I am using the channelId from this URL channel/ https://www.youtube.com/channel/UC3dcNnNLv9SUnh7BbqkkV_A. As you mentioned I have moved my channel to brand account but still I can't able to create a transfer in Google BQ DTS – Brisi Mar 19 '19 at 12:29
0

Also to add this question, anno 2023 you don't need to fill in the channel ID. You might run a backfill yourself and get this error. Note that it takes BQ & YT 2 days to sync up.

It is stated in their docs here: https://cloud.google.com/bigquery/docs/transfer-troubleshooting#youtube_transfer_issues

Michel K
  • 641
  • 1
  • 6
  • 18