BQ on code repositories

BQ connector in code repositories.

Currently Im missing many possibilities in the current connector, so I wanted to use that data connection in code repositories, but Im facing the issue:

Im currently trying the most basic code possible:

from transforms.api import transform_df, Output, Input
from transforms.external.systems import external_systems, Source

@external_systems(
media_source=Source(“ri…8”)
)
@transform_df(
Output(“…/test_extraction”)
)
def compute(media_source, ctx):
media_url = media_source.get_https_connection().url
return None

Is there any workaround or deeper explanation why this is not working? May I do any adjustment on my side in the connection to allow it to work?

It looks like you have a REST API source with multiple domains configured, is that the case?

If so, this isn’t supported for imports into code, so you should go back to data connection and split those into separate source types. Note that you can import multiple sources into your code, so if you need multiple domains from the same transformation this should be fine as long as they are configured as independent sources.

This is an example REST API source configuration that would produce the error you’re seeing when imported to code.

Alternatively, you can now just create a “generic” source for use in code only directly from data connection. This will allow you to just add network egress and credentials directly in the sidebar to set up your connection. This can be done using the button shown below:

1 Like