Feature Engine
Integrate with Spanner.
Chalk supports Spanner as a natively accelerated SQL source.
Follow the GCP instructions to give Chalk access to application credentials for your GCP account. Chalk will use these credentials to access Spanner. On the dashboard, you can plug in the configuration for your Spanner database:
Add a Spanner integration. These parameters will also be available as environment variables.

After configuring your Spanner integration in the dashboard, define your data sources in Python:
from chalk.sql import SpannerSource
spanner_source_txns = SpannerSource(name="SPANNER_TRANSACTIONS")
spanner_source_marketing = SpannerSource(name="SPANNER_MARKETING")Then reference them in SQL file resolvers using the name parameter. For example, to query from the SPANNER_TRANSACTIONS source:
-- type: online
-- resolves: User
-- source: SPANNER_TRANSACTIONS
SELECT
id,
TransactionVolume AS transaction_volume
FROM
UserTableAnd to query from the SPANNER_MARKETING source:
-- type: online
-- resolves: User
-- source: SPANNER_MARKETING
SELECT
id,
email,
campaign_status
FROM
MarketingTable