bigquery-data-science 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. bigquery_data_science/__init__.py +58 -0
  2. bigquery_data_science/_skills/PLANS.md +76 -0
  3. bigquery_data_science/_skills/bigquery-ai/SKILL.md +66 -0
  4. bigquery_data_science/_skills/bigquery-ai/narrative/ai_agg.md +528 -0
  5. bigquery_data_science/_skills/bigquery-ai/narrative/ai_classify.md +450 -0
  6. bigquery_data_science/_skills/bigquery-ai/narrative/ai_count_tokens.md +180 -0
  7. bigquery_data_science/_skills/bigquery-ai/narrative/ai_detect_anomalies.md +322 -0
  8. bigquery_data_science/_skills/bigquery-ai/narrative/ai_embed.md +425 -0
  9. bigquery_data_science/_skills/bigquery-ai/narrative/ai_evaluate.md +368 -0
  10. bigquery_data_science/_skills/bigquery-ai/narrative/ai_forecast.md +437 -0
  11. bigquery_data_science/_skills/bigquery-ai/narrative/ai_generate.md +693 -0
  12. bigquery_data_science/_skills/bigquery-ai/narrative/ai_generate_bool.md +248 -0
  13. bigquery_data_science/_skills/bigquery-ai/narrative/ai_generate_double.md +254 -0
  14. bigquery_data_science/_skills/bigquery-ai/narrative/ai_generate_embedding.md +402 -0
  15. bigquery_data_science/_skills/bigquery-ai/narrative/ai_generate_int.md +252 -0
  16. bigquery_data_science/_skills/bigquery-ai/narrative/ai_generate_table.md +447 -0
  17. bigquery_data_science/_skills/bigquery-ai/narrative/ai_generate_text.md +356 -0
  18. bigquery_data_science/_skills/bigquery-ai/narrative/ai_if.md +373 -0
  19. bigquery_data_science/_skills/bigquery-ai/narrative/ai_key_drivers.md +331 -0
  20. bigquery_data_science/_skills/bigquery-ai/narrative/ai_parse_document.md +416 -0
  21. bigquery_data_science/_skills/bigquery-ai/narrative/ai_predict.md +559 -0
  22. bigquery_data_science/_skills/bigquery-ai/narrative/ai_score.md +310 -0
  23. bigquery_data_science/_skills/bigquery-ai/narrative/ai_search.md +465 -0
  24. bigquery_data_science/_skills/bigquery-ai/narrative/ai_similarity.md +371 -0
  25. bigquery_data_science/_skills/bigquery-ai/narrative/catalog_search.md +951 -0
  26. bigquery_data_science/_skills/bigquery-ai/narrative/content_analysis.md +284 -0
  27. bigquery_data_science/_skills/bigquery-ai/narrative/content_moderation.md +369 -0
  28. bigquery_data_science/_skills/bigquery-ai/narrative/data_enrichment.md +426 -0
  29. bigquery_data_science/_skills/bigquery-ai/narrative/document_intelligence.md +470 -0
  30. bigquery_data_science/_skills/bigquery-ai/narrative/document_rag.md +453 -0
  31. bigquery_data_science/_skills/bigquery-ai/narrative/image_deduplication.md +770 -0
  32. bigquery_data_science/_skills/bigquery-ai/narrative/log_analysis.md +668 -0
  33. bigquery_data_science/_skills/bigquery-ai/narrative/metric_diagnostics.md +568 -0
  34. bigquery_data_science/_skills/bigquery-ai/narrative/ml_annotate_image.md +680 -0
  35. bigquery_data_science/_skills/bigquery-ai/narrative/ml_generate_embedding.md +217 -0
  36. bigquery_data_science/_skills/bigquery-ai/narrative/ml_generate_text.md +223 -0
  37. bigquery_data_science/_skills/bigquery-ai/narrative/ml_process_document.md +392 -0
  38. bigquery_data_science/_skills/bigquery-ai/narrative/ml_transcribe.md +815 -0
  39. bigquery_data_science/_skills/bigquery-ai/narrative/ml_translate.md +600 -0
  40. bigquery_data_science/_skills/bigquery-ai/narrative/ml_understand_text.md +673 -0
  41. bigquery_data_science/_skills/bigquery-ai/narrative/multimodal_analysis.md +266 -0
  42. bigquery_data_science/_skills/bigquery-ai/narrative/rag_pipeline.md +593 -0
  43. bigquery_data_science/_skills/bigquery-ai/narrative/semantic_search.md +510 -0
  44. bigquery_data_science/_skills/bigquery-ai/narrative/tabular_prediction.md +485 -0
  45. bigquery_data_science/_skills/bigquery-ai/narrative/time_series_intelligence.md +489 -0
  46. bigquery_data_science/_skills/bigquery-ai/narrative/vector_search.md +672 -0
  47. bigquery_data_science/_skills/bigquery-ai/reference/augmented-analytics.md +77 -0
  48. bigquery_data_science/_skills/bigquery-ai/reference/cloud-ai-service-models.md +88 -0
  49. bigquery_data_science/_skills/bigquery-ai/reference/document-processing.md +95 -0
  50. bigquery_data_science/_skills/bigquery-ai/reference/embeddings-and-search.md +166 -0
  51. bigquery_data_science/_skills/bigquery-ai/reference/general-purpose-generation.md +87 -0
  52. bigquery_data_science/_skills/bigquery-ai/reference/managed-functions.md +72 -0
  53. bigquery_data_science/_skills/bigquery-ai/reference/predictive-ai.md +113 -0
  54. bigquery_data_science/_skills/bigquery-ai/reference/workflows.md +56 -0
  55. bigquery_data_science/_skills/bigquery-ai/skill.manifest.json +109 -0
  56. bigquery_data_science/_skills/bigquery-ai/syntax/INDEX.md +71 -0
  57. bigquery_data_science/_skills/bigquery-ai/syntax/aiagg.md +67 -0
  58. bigquery_data_science/_skills/bigquery-ai/syntax/aicausal_effect-covered-in-bigquery-ml.md +17 -0
  59. bigquery_data_science/_skills/bigquery-ai/syntax/aiclassify.md +72 -0
  60. bigquery_data_science/_skills/bigquery-ai/syntax/aicount_tokens.md +53 -0
  61. bigquery_data_science/_skills/bigquery-ai/syntax/aidetect_anomalies.md +63 -0
  62. bigquery_data_science/_skills/bigquery-ai/syntax/aiembed.md +85 -0
  63. bigquery_data_science/_skills/bigquery-ai/syntax/aievaluate.md +114 -0
  64. bigquery_data_science/_skills/bigquery-ai/syntax/aiforecast.md +123 -0
  65. bigquery_data_science/_skills/bigquery-ai/syntax/aigenerate.md +69 -0
  66. bigquery_data_science/_skills/bigquery-ai/syntax/aigenerate_bool.md +53 -0
  67. bigquery_data_science/_skills/bigquery-ai/syntax/aigenerate_double.md +45 -0
  68. bigquery_data_science/_skills/bigquery-ai/syntax/aigenerate_embedding.md +108 -0
  69. bigquery_data_science/_skills/bigquery-ai/syntax/aigenerate_int.md +45 -0
  70. bigquery_data_science/_skills/bigquery-ai/syntax/aigenerate_table.md +64 -0
  71. bigquery_data_science/_skills/bigquery-ai/syntax/aigenerate_text.md +167 -0
  72. bigquery_data_science/_skills/bigquery-ai/syntax/aiif.md +56 -0
  73. bigquery_data_science/_skills/bigquery-ai/syntax/aikey_drivers.md +76 -0
  74. bigquery_data_science/_skills/bigquery-ai/syntax/aiparse_document.md +91 -0
  75. bigquery_data_science/_skills/bigquery-ai/syntax/aipredict.md +74 -0
  76. bigquery_data_science/_skills/bigquery-ai/syntax/aiscore.md +52 -0
  77. bigquery_data_science/_skills/bigquery-ai/syntax/aisearch.md +66 -0
  78. bigquery_data_science/_skills/bigquery-ai/syntax/aisimilarity.md +79 -0
  79. bigquery_data_science/_skills/bigquery-ai/syntax/choosing-between-these-and-the-ai-functions.md +11 -0
  80. bigquery_data_science/_skills/bigquery-ai/syntax/hybrid-search-capability.md +165 -0
  81. bigquery_data_science/_skills/bigquery-ai/syntax/mlannotate_image.md +24 -0
  82. bigquery_data_science/_skills/bigquery-ai/syntax/mlgenerate_embedding.md +34 -0
  83. bigquery_data_science/_skills/bigquery-ai/syntax/mlgenerate_text.md +65 -0
  84. bigquery_data_science/_skills/bigquery-ai/syntax/mlprocess_document.md +125 -0
  85. bigquery_data_science/_skills/bigquery-ai/syntax/mltranscribe.md +26 -0
  86. bigquery_data_science/_skills/bigquery-ai/syntax/mltranslate.md +27 -0
  87. bigquery_data_science/_skills/bigquery-ai/syntax/mlunderstand_text.md +32 -0
  88. bigquery_data_science/_skills/bigquery-ai/syntax/multimodal-input-patterns-by-function.md +128 -0
  89. bigquery_data_science/_skills/bigquery-ai/syntax/object-tables.md +109 -0
  90. bigquery_data_science/_skills/bigquery-ai/syntax/objectref-and-objectrefruntime-schema-reference.md +50 -0
  91. bigquery_data_science/_skills/bigquery-ai/syntax/objfetch_metadata.md +49 -0
  92. bigquery_data_science/_skills/bigquery-ai/syntax/objget_access_url.md +66 -0
  93. bigquery_data_science/_skills/bigquery-ai/syntax/objget_read_url.md +40 -0
  94. bigquery_data_science/_skills/bigquery-ai/syntax/objlist.md +34 -0
  95. bigquery_data_science/_skills/bigquery-ai/syntax/objmake_ref.md +58 -0
  96. bigquery_data_science/_skills/bigquery-ai/syntax/per-row-failures-and-the-retry-pattern.md +19 -0
  97. bigquery_data_science/_skills/bigquery-ai/syntax/setup-apis-connection-roles.md +39 -0
  98. bigquery_data_science/_skills/bigquery-ai/syntax/two-input-shapes.md +22 -0
  99. bigquery_data_science/_skills/bigquery-ai/syntax/vector_search.md +78 -0
  100. bigquery_data_science/_skills/bigquery-ai/syntax/what-the-five-have-in-common.md +27 -0
  101. bigquery_data_science/_skills/bigquery-data-science/SKILL.md +69 -0
  102. bigquery_data_science/_skills/bigquery-data-science/reference/namespace-matrix.md +112 -0
  103. bigquery_data_science/_skills/bigquery-data-science/skill.manifest.json +13 -0
  104. bigquery_data_science/_skills/bigquery-ml/SKILL.md +70 -0
  105. bigquery_data_science/_skills/bigquery-ml/narrative/airflow_with_kfp.md +379 -0
  106. bigquery_data_science/_skills/bigquery-ml/narrative/anomaly_fraud_detection.md +195 -0
  107. bigquery_data_science/_skills/bigquery-ml/narrative/arima_plus.md +635 -0
  108. bigquery_data_science/_skills/bigquery-ml/narrative/arima_plus_xreg.md +453 -0
  109. bigquery_data_science/_skills/bigquery-ml/narrative/autoencoder.md +470 -0
  110. bigquery_data_science/_skills/bigquery-ml/narrative/automl_classifier.md +291 -0
  111. bigquery_data_science/_skills/bigquery-ml/narrative/automl_regressor.md +274 -0
  112. bigquery_data_science/_skills/bigquery-ml/narrative/boosted_tree_classifier.md +449 -0
  113. bigquery_data_science/_skills/bigquery-ml/narrative/boosted_tree_regressor.md +400 -0
  114. bigquery_data_science/_skills/bigquery-ml/narrative/bucketizing.md +201 -0
  115. bigquery_data_science/_skills/bigquery-ml/narrative/causal_effect.md +773 -0
  116. bigquery_data_science/_skills/bigquery-ml/narrative/churn_retention.md +271 -0
  117. bigquery_data_science/_skills/bigquery-ml/narrative/cloud_workflows.md +370 -0
  118. bigquery_data_science/_skills/bigquery-ml/narrative/composer_airflow.md +475 -0
  119. bigquery_data_science/_skills/bigquery-ml/narrative/contribution_analysis.md +346 -0
  120. bigquery_data_science/_skills/bigquery-ml/narrative/cross_validation.md +185 -0
  121. bigquery_data_science/_skills/bigquery-ml/narrative/customer_segmentation.md +233 -0
  122. bigquery_data_science/_skills/bigquery-ml/narrative/dataform.md +372 -0
  123. bigquery_data_science/_skills/bigquery-ml/narrative/dbt.md +283 -0
  124. bigquery_data_science/_skills/bigquery-ml/narrative/difference_in_differences.md +280 -0
  125. bigquery_data_science/_skills/bigquery-ml/narrative/distance.md +195 -0
  126. bigquery_data_science/_skills/bigquery-ml/narrative/dnn_classifier.md +326 -0
  127. bigquery_data_science/_skills/bigquery-ml/narrative/dnn_regressor.md +308 -0
  128. bigquery_data_science/_skills/bigquery-ml/narrative/embeddings_classification.md +426 -0
  129. bigquery_data_science/_skills/bigquery-ml/narrative/encoding.md +238 -0
  130. bigquery_data_science/_skills/bigquery-ml/narrative/ensembling.md +278 -0
  131. bigquery_data_science/_skills/bigquery-ml/narrative/evaluation.md +445 -0
  132. bigquery_data_science/_skills/bigquery-ml/narrative/exploration.md +779 -0
  133. bigquery_data_science/_skills/bigquery-ml/narrative/export.md +321 -0
  134. bigquery_data_science/_skills/bigquery-ml/narrative/feature_engineering.md +280 -0
  135. bigquery_data_science/_skills/bigquery-ml/narrative/feature_store.md +652 -0
  136. bigquery_data_science/_skills/bigquery-ml/narrative/feature_store_workflow.md +426 -0
  137. bigquery_data_science/_skills/bigquery-ml/narrative/ga4_churn_prediction.md +285 -0
  138. bigquery_data_science/_skills/bigquery-ml/narrative/hierarchical_forecasting.md +441 -0
  139. bigquery_data_science/_skills/bigquery-ml/narrative/image.md +791 -0
  140. bigquery_data_science/_skills/bigquery-ml/narrative/imported.md +426 -0
  141. bigquery_data_science/_skills/bigquery-ml/narrative/kmeans.md +348 -0
  142. bigquery_data_science/_skills/bigquery-ml/narrative/linear_regression.md +372 -0
  143. bigquery_data_science/_skills/bigquery-ml/narrative/logistic_regression.md +390 -0
  144. bigquery_data_science/_skills/bigquery-ml/narrative/matrix_factorization.md +404 -0
  145. bigquery_data_science/_skills/bigquery-ml/narrative/model_monitoring.md +609 -0
  146. bigquery_data_science/_skills/bigquery-ml/narrative/pca.md +357 -0
  147. bigquery_data_science/_skills/bigquery-ml/narrative/price_elasticity_dml.md +286 -0
  148. bigquery_data_science/_skills/bigquery-ml/narrative/propensity_score_matching.md +350 -0
  149. bigquery_data_science/_skills/bigquery-ml/narrative/random_forest_classifier.md +445 -0
  150. bigquery_data_science/_skills/bigquery-ml/narrative/random_forest_regressor.md +409 -0
  151. bigquery_data_science/_skills/bigquery-ml/narrative/recommendation.md +281 -0
  152. bigquery_data_science/_skills/bigquery-ml/narrative/regression_based_forecasting.md +491 -0
  153. bigquery_data_science/_skills/bigquery-ml/narrative/remote.md +428 -0
  154. bigquery_data_science/_skills/bigquery-ml/narrative/scalers.md +325 -0
  155. bigquery_data_science/_skills/bigquery-ml/narrative/scheduled_queries.md +284 -0
  156. bigquery_data_science/_skills/bigquery-ml/narrative/sql_scripting.md +243 -0
  157. bigquery_data_science/_skills/bigquery-ml/narrative/survival_analysis.md +363 -0
  158. bigquery_data_science/_skills/bigquery-ml/narrative/synthetic_control.md +221 -0
  159. bigquery_data_science/_skills/bigquery-ml/narrative/text.md +215 -0
  160. bigquery_data_science/_skills/bigquery-ml/narrative/time_series.md +669 -0
  161. bigquery_data_science/_skills/bigquery-ml/narrative/transform_only.md +273 -0
  162. bigquery_data_science/_skills/bigquery-ml/narrative/uplift_cate.md +241 -0
  163. bigquery_data_science/_skills/bigquery-ml/narrative/vertex_kfp.md +360 -0
  164. bigquery_data_science/_skills/bigquery-ml/narrative/wide_and_deep_classifier.md +316 -0
  165. bigquery_data_science/_skills/bigquery-ml/narrative/wide_and_deep_regressor.md +298 -0
  166. bigquery_data_science/_skills/bigquery-ml/reference/classification.md +80 -0
  167. bigquery_data_science/_skills/bigquery-ml/reference/model-management.md +90 -0
  168. bigquery_data_science/_skills/bigquery-ml/reference/preprocessing-functions.md +234 -0
  169. bigquery_data_science/_skills/bigquery-ml/reference/regression.md +79 -0
  170. bigquery_data_science/_skills/bigquery-ml/reference/unsupervised-and-specialized.md +101 -0
  171. bigquery_data_science/_skills/bigquery-ml/reference/workflows-and-pipelines.md +111 -0
  172. bigquery_data_science/_skills/bigquery-ml/skill.manifest.json +177 -0
  173. bigquery_data_science/_skills/bigquery-ml/syntax/1-model_type-catalog.md +28 -0
  174. bigquery_data_science/_skills/bigquery-ml/syntax/2-task-mlevaluate-metric-columns.md +26 -0
  175. bigquery_data_science/_skills/bigquery-ml/syntax/3-capability-matrix-per-model-type.md +21 -0
  176. bigquery_data_science/_skills/bigquery-ml/syntax/4-explainability-weights-functions.md +14 -0
  177. bigquery_data_science/_skills/bigquery-ml/syntax/5-connection-matrix.md +11 -0
  178. bigquery_data_science/_skills/bigquery-ml/syntax/6-which-model-free-function-no-create-model-no-connection.md +15 -0
  179. bigquery_data_science/_skills/bigquery-ml/syntax/7-point-in-time-feature-retrieval-which-of-the-two.md +11 -0
  180. bigquery_data_science/_skills/bigquery-ml/syntax/INDEX.md +111 -0
  181. bigquery_data_science/_skills/bigquery-ml/syntax/aicausal_effect.md +85 -0
  182. bigquery_data_science/_skills/bigquery-ml/syntax/arima_plus-forecasting-lifecycle-functions.md +14 -0
  183. bigquery_data_science/_skills/bigquery-ml/syntax/arima_plus-univariate-time-series-forecasting.md +132 -0
  184. bigquery_data_science/_skills/bigquery-ml/syntax/arima_plus_xreg-multivariate-time-series-with-external-regressors.md +103 -0
  185. bigquery_data_science/_skills/bigquery-ml/syntax/autoencoder.md +102 -0
  186. bigquery_data_science/_skills/bigquery-ml/syntax/automl_classifier-automl_regressor.md +88 -0
  187. bigquery_data_science/_skills/bigquery-ml/syntax/boosted_tree_classifier-boosted_tree_regressor.md +117 -0
  188. bigquery_data_science/_skills/bigquery-ml/syntax/contribution_analysis.md +113 -0
  189. bigquery_data_science/_skills/bigquery-ml/syntax/dnn_classifier-dnn_regressor.md +107 -0
  190. bigquery_data_science/_skills/bigquery-ml/syntax/dnn_linear_combined_classifier-dnn_linear_combined_regressor-wide-and-deep.md +98 -0
  191. bigquery_data_science/_skills/bigquery-ml/syntax/explainability-functions-mlexplain_predict-mlglobal_explain-mlfeature_importance.md +7 -0
  192. bigquery_data_science/_skills/bigquery-ml/syntax/exploratory-data-analysis-mldescribe_data-mlcorrelation.md +11 -0
  193. bigquery_data_science/_skills/bigquery-ml/syntax/export-model.md +92 -0
  194. bigquery_data_science/_skills/bigquery-ml/syntax/feature-engineering-standalone-preprocessing-functions.md +13 -0
  195. bigquery_data_science/_skills/bigquery-ml/syntax/image-preprocessing-functions-mldecode_image-mlresize_image-mlconvert_image_type-mlconvert_color_space.md +63 -0
  196. bigquery_data_science/_skills/bigquery-ml/syntax/imported-models-tensorflow-tensorflow_lite-onnx-xgboost.md +36 -0
  197. bigquery_data_science/_skills/bigquery-ml/syntax/kmeans.md +87 -0
  198. bigquery_data_science/_skills/bigquery-ml/syntax/linear_reg-logistic_reg-generalized-linear-models.md +101 -0
  199. bigquery_data_science/_skills/bigquery-ml/syntax/matrix_factorization.md +162 -0
  200. bigquery_data_science/_skills/bigquery-ml/syntax/mladvanced_weights.md +76 -0
  201. bigquery_data_science/_skills/bigquery-ml/syntax/mlarima_coefficients.md +30 -0
  202. bigquery_data_science/_skills/bigquery-ml/syntax/mlarima_evaluate.md +49 -0
  203. bigquery_data_science/_skills/bigquery-ml/syntax/mlbag_of_words.md +47 -0
  204. bigquery_data_science/_skills/bigquery-ml/syntax/mlbucketize.md +47 -0
  205. bigquery_data_science/_skills/bigquery-ml/syntax/mlcentroids.md +46 -0
  206. bigquery_data_science/_skills/bigquery-ml/syntax/mlconfusion_matrix.md +56 -0
  207. bigquery_data_science/_skills/bigquery-ml/syntax/mlconvert_color_space.md +53 -0
  208. bigquery_data_science/_skills/bigquery-ml/syntax/mlconvert_image_type.md +39 -0
  209. bigquery_data_science/_skills/bigquery-ml/syntax/mlcorrelation.md +78 -0
  210. bigquery_data_science/_skills/bigquery-ml/syntax/mldecode_image.md +44 -0
  211. bigquery_data_science/_skills/bigquery-ml/syntax/mldescribe_data.md +74 -0
  212. bigquery_data_science/_skills/bigquery-ml/syntax/mldetect_anomalies.md +86 -0
  213. bigquery_data_science/_skills/bigquery-ml/syntax/mldistance.md +48 -0
  214. bigquery_data_science/_skills/bigquery-ml/syntax/mlentity_features_at_time.md +56 -0
  215. bigquery_data_science/_skills/bigquery-ml/syntax/mlevaluate.md +72 -0
  216. bigquery_data_science/_skills/bigquery-ml/syntax/mlexplain_forecast.md +50 -0
  217. bigquery_data_science/_skills/bigquery-ml/syntax/mlexplain_predict.md +66 -0
  218. bigquery_data_science/_skills/bigquery-ml/syntax/mlfeature_cross.md +46 -0
  219. bigquery_data_science/_skills/bigquery-ml/syntax/mlfeature_importance.md +47 -0
  220. bigquery_data_science/_skills/bigquery-ml/syntax/mlfeature_info.md +50 -0
  221. bigquery_data_science/_skills/bigquery-ml/syntax/mlfeatures_at_time.md +51 -0
  222. bigquery_data_science/_skills/bigquery-ml/syntax/mlforecast.md +76 -0
  223. bigquery_data_science/_skills/bigquery-ml/syntax/mlgenerate_embedding-from-a-bqml-pca-autoencoder-matrix_factorization-model.md +64 -0
  224. bigquery_data_science/_skills/bigquery-ml/syntax/mlglobal_explain.md +63 -0
  225. bigquery_data_science/_skills/bigquery-ml/syntax/mlhash_bucketize.md +47 -0
  226. bigquery_data_science/_skills/bigquery-ml/syntax/mlholiday_info.md +46 -0
  227. bigquery_data_science/_skills/bigquery-ml/syntax/mlimputer.md +46 -0
  228. bigquery_data_science/_skills/bigquery-ml/syntax/mllp_norm.md +47 -0
  229. bigquery_data_science/_skills/bigquery-ml/syntax/mlmetrics.md +80 -0
  230. bigquery_data_science/_skills/bigquery-ml/syntax/mlngrams.md +37 -0
  231. bigquery_data_science/_skills/bigquery-ml/syntax/mlone_hot_encoder-mlmulti_hot_encoder-mllabel_encoder.md +67 -0
  232. bigquery_data_science/_skills/bigquery-ml/syntax/mlpolynomial_expand.md +47 -0
  233. bigquery_data_science/_skills/bigquery-ml/syntax/mlpredict.md +67 -0
  234. bigquery_data_science/_skills/bigquery-ml/syntax/mlprincipal_component_info.md +42 -0
  235. bigquery_data_science/_skills/bigquery-ml/syntax/mlprincipal_components.md +40 -0
  236. bigquery_data_science/_skills/bigquery-ml/syntax/mlquantile_bucketize.md +43 -0
  237. bigquery_data_science/_skills/bigquery-ml/syntax/mlrecommend.md +60 -0
  238. bigquery_data_science/_skills/bigquery-ml/syntax/mlreconstruction_loss.md +48 -0
  239. bigquery_data_science/_skills/bigquery-ml/syntax/mlresize_image.md +45 -0
  240. bigquery_data_science/_skills/bigquery-ml/syntax/mlroc_curve.md +63 -0
  241. bigquery_data_science/_skills/bigquery-ml/syntax/mltf_idf.md +37 -0
  242. bigquery_data_science/_skills/bigquery-ml/syntax/mltfdv_describe.md +34 -0
  243. bigquery_data_science/_skills/bigquery-ml/syntax/mltfdv_validate.md +48 -0
  244. bigquery_data_science/_skills/bigquery-ml/syntax/mltraining_info.md +78 -0
  245. bigquery_data_science/_skills/bigquery-ml/syntax/mltransform-applying-a-saved-transform.md +52 -0
  246. bigquery_data_science/_skills/bigquery-ml/syntax/mltranspose-not-a-function-pointer.md +32 -0
  247. bigquery_data_science/_skills/bigquery-ml/syntax/mltrial_info.md +60 -0
  248. bigquery_data_science/_skills/bigquery-ml/syntax/mlvalidate_data_drift.md +99 -0
  249. bigquery_data_science/_skills/bigquery-ml/syntax/mlvalidate_data_skew.md +50 -0
  250. bigquery_data_science/_skills/bigquery-ml/syntax/mlweights.md +84 -0
  251. bigquery_data_science/_skills/bigquery-ml/syntax/model-free-time-series-decomposition-mltrend-mlseasonality-mldetect_change_points.md +100 -0
  252. bigquery_data_science/_skills/bigquery-ml/syntax/model-introspection-mlfeature_info-mltraining_info-mltrial_info.md +7 -0
  253. bigquery_data_science/_skills/bigquery-ml/syntax/model-monitoring-data-validation.md +23 -0
  254. bigquery_data_science/_skills/bigquery-ml/syntax/numerical-scalers-mlstandard_scaler-mlmin_max_scaler-mlmax_abs_scaler-mlrobust_scaler-mlnormalizer.md +77 -0
  255. bigquery_data_science/_skills/bigquery-ml/syntax/onnx.md +55 -0
  256. bigquery_data_science/_skills/bigquery-ml/syntax/pca.md +91 -0
  257. bigquery_data_science/_skills/bigquery-ml/syntax/point-in-time-feature-retrieval-mlfeatures_at_time-mlentity_features_at_time.md +25 -0
  258. bigquery_data_science/_skills/bigquery-ml/syntax/quick-comparison.md +14 -0
  259. bigquery_data_science/_skills/bigquery-ml/syntax/random_forest_classifier-random_forest_regressor.md +123 -0
  260. bigquery_data_science/_skills/bigquery-ml/syntax/remote-remote-model-over-a-vertex-ai-endpoint-the-mechanism.md +87 -0
  261. bigquery_data_science/_skills/bigquery-ml/syntax/tensorflow.md +48 -0
  262. bigquery_data_science/_skills/bigquery-ml/syntax/tensorflow_lite.md +29 -0
  263. bigquery_data_science/_skills/bigquery-ml/syntax/text-preprocessing-functions-mlngrams-mltf_idf-mlbag_of_words.md +18 -0
  264. bigquery_data_science/_skills/bigquery-ml/syntax/timesfm-built-in-foundation-forecaster-see-bigquery-ai.md +28 -0
  265. bigquery_data_science/_skills/bigquery-ml/syntax/transform_only.md +91 -0
  266. bigquery_data_science/_skills/bigquery-ml/syntax/xgboost.md +72 -0
  267. bigquery_data_science/_skills/pinned-models.json +28 -0
  268. bigquery_data_science/catalog.py +1107 -0
  269. bigquery_data_science/cli.py +786 -0
  270. bigquery_data_science/installer.py +282 -0
  271. bigquery_data_science/mcp_server.py +317 -0
  272. bigquery_data_science/tooling/__init__.py +15 -0
  273. bigquery_data_science/tooling/convert_notebook.py +176 -0
  274. bigquery_data_science/tooling/link_policy.py +247 -0
  275. bigquery_data_science/tooling/manifest.py +152 -0
  276. bigquery_data_science/tooling/markdown_anchors.py +84 -0
  277. bigquery_data_science/tooling/narrative_drift.py +163 -0
  278. bigquery_data_science/tooling/pinned_models.py +216 -0
  279. bigquery_data_science/tooling/reference_structure.py +85 -0
  280. bigquery_data_science/tooling/sync_syntax.py +407 -0
  281. bigquery_data_science/tooling/validate.py +208 -0
  282. bigquery_data_science-0.7.0.dist-info/METADATA +306 -0
  283. bigquery_data_science-0.7.0.dist-info/RECORD +286 -0
  284. bigquery_data_science-0.7.0.dist-info/WHEEL +4 -0
  285. bigquery_data_science-0.7.0.dist-info/entry_points.txt +5 -0
  286. bigquery_data_science-0.7.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,40 @@
1
+ # `OBJ.GET_READ_URL`
2
+
3
+ > **Source:** [`bigquery-ai/reference/unstructured-data-infrastructure.md#objget_read_url`](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/reference/unstructured-data-infrastructure.md#objget_read_url)
4
+
5
+ - **Description:** (Preview) Scalar function that returns a `STRUCT<url STRING, status STRING>` holding a read URL for a Cloud Storage object. The URL expires after **45 minutes**.
6
+ - **Use cases:** Render an object inline in BigQuery Studio query results — the `url` column displays the image rather than the link text. A shorter-lived, read-only alternative to `OBJ.GET_ACCESS_URL` when all you need is to look at the object.
7
+ - [documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/objectref_functions)
8
+ - **Type:** Scalar function (returns STRUCT) — Preview
9
+
10
+ **Syntax:**
11
+ ```sql
12
+ OBJ.GET_READ_URL(objectref)
13
+ ```
14
+
15
+ **Inputs:**
16
+
17
+ | Parameter | Type | Required | Description |
18
+ |-----------|------|----------|-------------|
19
+ | `objectref` | ObjectRef STRUCT | Required | Must use **delegated access** — the ObjectRef has to carry an `authorizer`. A direct-access ObjectRef is rejected. |
20
+
21
+ **Outputs:** `STRUCT<url STRING, status STRING>`. On success `url` holds the read URL and `status` is `NULL`; on failure `url` is `NULL` and `status` holds the error message. Nothing raises — check `status`.
22
+
23
+ ```sql
24
+ SELECT OBJ.GET_READ_URL(poster) AS read_url
25
+ FROM `mydataset.films`;
26
+ ```
27
+
28
+ **How it differs from `OBJ.GET_ACCESS_URL`:**
29
+
30
+ | | `OBJ.GET_READ_URL` | `OBJ.GET_ACCESS_URL` |
31
+ |---|---|---|
32
+ | Returns | `STRUCT<url, status>` | `ObjectRefRuntime` JSON |
33
+ | Modes | Read only | `'r'` or `'rw'` |
34
+ | TTL | Fixed 45 minutes | 30 min – 6 hours, caller-set |
35
+ | Access | Delegated access required | Either |
36
+ | Errors | Reported in `status` | Reported in `runtime_errors` |
37
+
38
+ **Locations:** All BigQuery regions supporting Cloud resource connections.
39
+
40
+ ---
@@ -0,0 +1,34 @@
1
+ # `OBJ.LIST`
2
+
3
+ > **Source:** [`bigquery-ai/reference/unstructured-data-infrastructure.md#objlist`](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/reference/unstructured-data-infrastructure.md#objlist)
4
+
5
+ - **Description:** (GA) Table-valued function that lists Cloud Storage objects matching a URI with one `*` wildcard per path segment and returns their metadata plus an `ObjectRef` for each — ad-hoc discovery of unstructured data without creating an object table. Works across all Cloud Storage storage classes.
6
+ - **Use cases:** Point an `AI.*` function at "every PDF in this prefix" in one query, feed `AI.AGG` a set of images, build an extract-and-load pipeline over a landing bucket without DDL, prototype against a public sample bucket.
7
+ - [documentation](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/objectref_functions#objlist)
8
+ - **Type:** Table-valued function — GA
9
+
10
+ **Syntax:**
11
+ ```sql
12
+ SELECT uri, content_type, size, ref
13
+ FROM OBJ.LIST(
14
+ uri
15
+ [, authorizer]
16
+ )
17
+ ```
18
+
19
+ **Inputs:**
20
+
21
+ | Parameter | Type | Required | Description |
22
+ |-----------|------|----------|-------------|
23
+ | `uri` | STRING literal | Required | Cloud Storage path with at most one `*` per segment, e.g. `gs://bucket/images/*.png`. Must be a literal — scalar subqueries and `CONCAT` are rejected. Must not end in `/` or contain `//` (`gs://bucket/images/` fails with *"GCS paths cannot end with a slash"* and suggests the `/*` form). |
24
+ | `authorizer` | STRING | Optional | Cloud resource connection for **delegated access**, e.g. `project.us.connection`. Omit it and every returned `ref` uses **direct access** — fetched as the identity running the query. |
25
+
26
+ **Outputs:** one row per object: `uri` STRING, `content_type` STRING, `size` INT64, `md5_hash` STRING, `updated` TIMESTAMP, `metadata` ARRAY\<STRUCT\<name STRING, value STRING\>\>, `generation` INT64, and `ref` — an `ObjectRef` whose `authorizer` is populated only when you passed one.
27
+
28
+ **Measured 2026-10-09** against `gs://cloud-samples-data/bigquery/tutorials/cymbal-pets/images/*.png` (205 objects): the no-authorizer form and the authorizer form both feed `AI.GENERATE`, the typed variants, `AI.IF`/`AI.SCORE`/`AI.CLASSIFY`, `AI.AGG`, `AI.EMBED` and `AI.SIMILARITY` directly via `ref`, with an empty `status` on every row. Direct access worked here because the bucket is public; on a private bucket it works only if the query runner holds `storage.objectViewer`, and inside a VPC Service Controls perimeter it is the form that works (see the note under [`OBJ.MAKE_REF`](objmake_ref.md)).
29
+
30
+ **Limitations:** Shares the object-table limitations because it generates the same metadata dynamically. The listing is computed per query — there is no persistence and no change tracking; use an object table for that. `ML.PROCESS_DOCUMENT` still reads object tables only.
31
+
32
+ **Locations:** All BigQuery regions supporting Cloud resource connections.
33
+
34
+ ---
@@ -0,0 +1,58 @@
1
+ # `OBJ.MAKE_REF`
2
+
3
+ > **Source:** [`bigquery-ai/reference/unstructured-data-infrastructure.md#objmake_ref`](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/reference/unstructured-data-infrastructure.md#objmake_ref)
4
+
5
+ - **Description:** (Preview) Scalar function that creates an `ObjectRef` value containing reference information for a Cloud Storage object. This is the entry point for creating ObjectRef values from raw URI strings — no validation is performed on JSON input.
6
+ - **Use cases:** Create ObjectRef values for standard table columns without object tables, build ad-hoc ObjectRef values inline in queries for one-off multimodal analysis, reference transformation outputs saved to Cloud Storage.
7
+ - [documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/objectref_functions)
8
+ - **Type:** Scalar function (returns ObjectRef STRUCT) — Preview
9
+
10
+ **Syntax (URI, optional authorizer):**
11
+ ```sql
12
+ OBJ.MAKE_REF(
13
+ uri
14
+ [, authorizer]
15
+ [, version => version_value]
16
+ [, details => gcs_metadata_json]
17
+ )
18
+ ```
19
+
20
+ **Syntax (JSON input):**
21
+ ```sql
22
+ OBJ.MAKE_REF(
23
+ objectref_json
24
+ )
25
+ ```
26
+
27
+ **Syntax (re-authorize an existing ObjectRef):**
28
+ ```sql
29
+ OBJ.MAKE_REF(
30
+ objectref,
31
+ authorizer
32
+ )
33
+ ```
34
+ The top-level `authorizer` overwrites whatever the input `objectref` carried.
35
+
36
+ **Inputs:**
37
+
38
+ | Parameter | Type | Required | Description |
39
+ |-----------|------|----------|-------------|
40
+ | `uri` | STRING | Required (overload 1) | Cloud Storage URI, e.g., `gs://mybucket/file.jpg`. Can be a column reference. |
41
+ | `authorizer` | STRING | Optional (overload 1) | Cloud resource connection, e.g., `us.myconnection`, used for **delegated access**. Must be in the same project and region as the query. Omit it and the ObjectRef uses **direct access** instead. |
42
+ | `version_value` | STRING | Optional | Cloud Storage object version. |
43
+ | `gcs_metadata_json` | JSON | Optional | Pre-supplied metadata: `{"content_type", "md5_hash", "size", "updated"}`. Fills `details` without a Cloud Storage round-trip. |
44
+ | `objectref_json` | JSON | Required (overload 2) | JSON with schema `{"uri": "string", "authorizer": "string"}`. No validation performed. |
45
+
46
+ **Outputs:** Returns `STRUCT<uri STRING, version STRING, authorizer STRING, details JSON>`. Only `uri` and `authorizer` are populated unless you supply `version` / `details`; otherwise use `OBJ.FETCH_METADATA` to fill them.
47
+
48
+ > **Dropping the authorizer changes who reads the object, not whether it works.** `OBJ.MAKE_REF('gs://bucket/file.pdf')` is legal and succeeds against private buckets — but only because the identity running the query holds `storage.objectViewer` on that bucket. That is **direct access**: the object is fetched as the query runner. Passing the connection gives **delegated access**, where the object is fetched as the connection's service account and the grant is auditable and independent of whoever runs the query. The examples throughout this project pass the connection for that reason.
49
+ >
50
+ > **Inside a VPC Service Controls perimeter the recommendation inverts.** Delegated access mints a signed HTTPS URL, and Agent Platform blocks HTTP/HTTPS fetches for projects inside a perimeter — so a delegated-access `ObjectRef`, **including an object table's `ref` column**, fails with `INVALID_ARGUMENT: HTTP links are not supported for requests restricted by VPCSC.` in the output's `status` field. In that environment use the single-argument `OBJ.MAKE_REF(uri)`: direct access sends the Cloud Storage URI to the model with no signed URL in between. This is also a reason to prefer inline `OBJ.MAKE_REF` over object tables inside a perimeter — an object table has no direct-access form.
51
+
52
+ **Limitations:**
53
+ - Maximum **20 connections** per project+region for queries referencing ObjectRef values.
54
+ - Connection must be in the same project and region as the query.
55
+
56
+ **Locations:** All BigQuery regions supporting Cloud resource connections.
57
+
58
+ ---
@@ -0,0 +1,19 @@
1
+ # Per-row failures and the retry pattern
2
+
3
+ > **Source:** [`bigquery-ai/reference/cloud-ai-service-models.md#per-row-failures-and-the-retry-pattern`](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/reference/cloud-ai-service-models.md#per-row-failures-and-the-retry-pattern)
4
+
5
+ Every member reports failure in a status column while the **job succeeds**. Measured examples: a non-audio file in a `ML.TRANSCRIBE` object table, and an unsupported language in `ML.UNDERSTAND_TEXT`. The standard shape is to persist results and re-run only the failures:
6
+
7
+ ```sql
8
+ CREATE OR REPLACE TABLE `PROJECT_ID.DATASET.results` AS
9
+ SELECT * FROM ML.TRANSCRIBE(MODEL ..., TABLE ..., recognition_config => JSON '...');
10
+
11
+ -- what failed, and why
12
+ SELECT uri, ml_transcribe_status
13
+ FROM `PROJECT_ID.DATASET.results`
14
+ WHERE ml_transcribe_status != '';
15
+ ```
16
+
17
+ Whether the retry can succeed depends on the cause: a `RESOURCE EXHAUSTED` row failed for load and will likely pass on a second attempt; a row that failed for an unsupported language or an unsupported encoding will fail identically forever. Read the status before retrying.
18
+
19
+ ---
@@ -0,0 +1,39 @@
1
+ # Setup: APIs, connection, roles
2
+
3
+ > **Source:** [`bigquery-ai/reference/cloud-ai-service-models.md#setup-apis-connection-roles`](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/reference/cloud-ai-service-models.md#setup-apis-connection-roles)
4
+
5
+ All five run through a **Cloud Resource connection**. The connection's auto-provisioned service account — not your user account — is the identity that calls the service and reads Cloud Storage.
6
+
7
+ **The APIs to enable**, beyond `bigquery.googleapis.com` and `bigqueryconnection.googleapis.com`:
8
+
9
+ | Function | Service API | Also needs |
10
+ |---|---|---|
11
+ | `ML.TRANSLATE` | `translate.googleapis.com` | — |
12
+ | `ML.UNDERSTAND_TEXT` | `language.googleapis.com` | — |
13
+ | `ML.ANNOTATE_IMAGE` | `vision.googleapis.com` | `storage.googleapis.com` |
14
+ | `ML.TRANSCRIBE` | `speech.googleapis.com` | `storage.googleapis.com` |
15
+ | `ML.PROCESS_DOCUMENT` | `documentai.googleapis.com` | `storage.googleapis.com` |
16
+
17
+ **The roles to grant the connection's service account**, at project level:
18
+
19
+ | Role | `TRANSLATE` | `UNDERSTAND_TEXT` | `ANNOTATE_IMAGE` | `TRANSCRIBE` | `PROCESS_DOCUMENT` |
20
+ |---|---|---|---|---|---|
21
+ | `roles/serviceusage.serviceUsageConsumer` | ✅ | ✅ | ✅ | ✅ | ✅ |
22
+ | `roles/bigquery.connectionUser` | ✅ | ✅ | ✅ | ✅ | ✅ |
23
+ | `roles/storage.objectViewer` (object tables) | — | — | ✅ | ✅ | ✅ |
24
+ | Service-specific role | `roles/cloudtranslate.user` | *none exists* | *none exists* | `roles/speech.client` | `roles/documentai.apiUser` + `roles/documentai.viewer` |
25
+ | `roles/aiplatform.user` | comparison examples only | comparison examples only | comparison examples only | comparison examples only | comparison examples only |
26
+
27
+ Three things this table is for:
28
+
29
+ - **The service-specific role is not uniform, and its absence is not an oversight.** Cloud Vision and Cloud Natural Language have no predefined IAM role — `serviceusage.services.use` is the permission that gates them, so their column stops at the BigQuery-side rows. Translation and Speech-to-Text each add one; Document AI adds two. Copying one member's setup to another either over-grants or fails at call time.
30
+ - **`roles/serviceusage.serviceUsageConsumer` is the one people miss.** Without it every call fails, no matter which service. The `ML.TRANSLATE` notebook shows the exact message, which names the missing role — more than most IAM failures give you, but it arrives at call time.
31
+ - **`roles/aiplatform.user` is not part of any of these functions.** Each notebook ends by running an `AI.*` function over the same rows for comparison, and *that* is what needs it. A deployment that only calls the Cloud AI service model can leave it off.
32
+
33
+ **`CREATE MODEL` succeeding tells you nothing about permissions.** Model creation does not contact the service, so it completes happily against a connection that cannot call anything. The first failure arrives at call time.
34
+
35
+ **Grants do not take effect instantly.** A freshly granted binding can take a minute to become usable. Each of the four notebooks on this page ends its setup with a probe on the smallest possible input, in a wait loop, so the first real example runs against a connection that has been shown to work — worth copying into any script that creates the connection and then uses it.
36
+
37
+ See the [Setup Reference](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/setup) for connection creation, and each notebook's Setup section for a runnable, idempotent version that also prints which roles it granted.
38
+
39
+ ---
@@ -0,0 +1,22 @@
1
+ # Two input shapes
2
+
3
+ > **Source:** [`bigquery-ai/reference/cloud-ai-service-models.md#two-input-shapes`](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/reference/cloud-ai-service-models.md#two-input-shapes)
4
+
5
+ **Object tables** — `ML.ANNOTATE_IMAGE`, `ML.TRANSCRIBE`, `ML.PROCESS_DOCUMENT`. An [object table](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/reference/unstructured-data-infrastructure.md) is an external table whose rows are files. It reads through the same connection, which is why the service account needs `roles/storage.objectViewer`:
6
+
7
+ ```sql
8
+ CREATE OR REPLACE EXTERNAL TABLE `PROJECT_ID.DATASET.OBJECT_TABLE`
9
+ WITH CONNECTION `PROJECT_ID.REGION.CONNECTION_ID`
10
+ OPTIONS (object_metadata = 'SIMPLE', uris = ['gs://BUCKET/PREFIX/*']);
11
+ ```
12
+
13
+ **A `text_content` column** — `ML.TRANSLATE`, `ML.UNDERSTAND_TEXT`. Both read a column named exactly `text_content`. A table without one errors, and the fix is an alias in a subquery rather than a rename of your table:
14
+
15
+ ```sql
16
+ FROM ML.TRANSLATE(
17
+ MODEL `PROJECT_ID.DATASET.MODEL_NAME`,
18
+ (SELECT review_id, comment AS text_content FROM `PROJECT_ID.DATASET.reviews`),
19
+ STRUCT('TRANSLATE_TEXT' AS translate_mode, 'en' AS target_language_code))
20
+ ```
21
+
22
+ ---
@@ -0,0 +1,78 @@
1
+ # `VECTOR_SEARCH`
2
+
3
+ > **Source:** [`bigquery-ai/reference/embedding-generation-and-semantic-search.md#vector_search`](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/reference/embedding-generation-and-semantic-search.md#vector_search)
4
+
5
+ - **Description:** Table-valued function that searches embeddings to find the top-K closest embeddings from a base table to a given query embedding. Supports both batch searches (multiple query rows) and single searches (one embedding value). Can use vector indexes for approximate nearest neighbor (ANN) search. The single search syntax additionally supports **hybrid search** -- combining semantic similarity with lexical (keyword) matching -- via `lexical_search_columns` and `lexical_search_query_value`.
6
+ - **Use cases:** Semantic search, hybrid semantic + keyword search, recommendation systems, classification, clustering, retrieval augmented generation (RAG).
7
+ - [documentation](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/search_functions#vector_search)
8
+ - **Type:** Table-valued function (TVF) -- GA (single search syntax is Preview)
9
+
10
+ **Syntax (batch search):**
11
+ ```sql
12
+ VECTOR_SEARCH(
13
+ { TABLE base_table | (base_table_query) },
14
+ column_to_search,
15
+ { TABLE query_table | (query_table_query) },
16
+ [, query_column_to_search => query_column_to_search_value]
17
+ [, top_k => top_k_value]
18
+ [, distance_type => distance_type_value]
19
+ [, options => options_value]
20
+ )
21
+ ```
22
+
23
+ **Syntax (single search -- Preview; also the hybrid search syntax):**
24
+ ```sql
25
+ VECTOR_SEARCH(
26
+ { TABLE base_table | (base_table_query) },
27
+ column_to_search,
28
+ query_value => single_query_value,
29
+ [, lexical_search_columns => lexical_search_columns_value]
30
+ [, lexical_search_query_value => single_lexical_search_query_value]
31
+ [, top_k => top_k_value]
32
+ [, distance_type => distance_type_value]
33
+ [, options => options_value]
34
+ )
35
+ ```
36
+
37
+ Supplying a non-empty `lexical_search_columns` is what makes the search hybrid. Hybrid search is only available in the single search syntax -- **there is no batch hybrid search**. See [Hybrid Search](hybrid-search-capability.md) below for how the fused score is computed.
38
+
39
+ **Inputs:**
40
+
41
+ | Parameter | Type | Required | Description |
42
+ |-----------|------|----------|-------------|
43
+ | `base_table` / `base_table_query` | Table/Query | Required | The table to search. Only SELECT, FROM, WHERE clauses allowed in query. Don't filter the embedding column. Can't use logical views. |
44
+ | `column_to_search` | STRING | Required | Base table column to search. Must be ARRAY\<FLOAT64\> or STRING (Preview, requires autonomous embedding generation). If indexed, BigQuery attempts to use it. |
45
+ | `query_table` / `query_table_query` | Table/Query | Required for batch | Query embeddings to find nearest neighbors for. |
46
+ | `query_column_to_search` | Named arg, STRING | Optional (batch only) | Column in query table containing embeddings. ARRAY\<FLOAT64\> or STRING. |
47
+ | `query_value` | Named arg, ARRAY\<FLOAT64\> or STRING | Required for single search | Single embedding or string to search for. |
48
+ | `lexical_search_columns` | Named arg, ARRAY\<STRING\> | Optional (single search only) | Base table columns to match lexically. Non-empty value switches the call to hybrid search. If the base table has a vector index with `lexical_search_columns`, these columns must be a subset of the indexed ones. |
49
+ | `lexical_search_query_value` | Named arg, STRING | Optional (single search only) | The keyword query text for the lexical leg. Defaults to `query_value` when that is a STRING. |
50
+ | `top_k` | Named arg, INT64 | Optional | Number of nearest neighbors per query. Default: 10. Negative = return all. |
51
+ | `distance_type` | Named arg, STRING | Optional | `EUCLIDEAN` (default), `COSINE`, or `DOT_PRODUCT`. |
52
+ | `options` | Named arg, JSON STRING | Optional | `fraction_lists_to_search` (0.0-1.0, index only), `use_brute_force` (boolean). |
53
+
54
+ **Outputs (batch search):**
55
+
56
+ | Column | Type | Description |
57
+ |--------|------|-------------|
58
+ | `query` | STRUCT | All selected columns from the query data |
59
+ | `base` | STRUCT | All columns from base_table |
60
+ | `distance` | FLOAT64 | Distance between base and query data |
61
+
62
+ **Outputs (single search):** Same but without the `query` column.
63
+
64
+ **Outputs (hybrid search):** Same shape as single search, but `distance` is **not a distance** -- it is a reciprocal rank fusion (RRF) score derived from the row's rank in the semantic and lexical result lists. Hybrid `distance` values are not comparable to semantic-only `distance` values. See [Hybrid Search](hybrid-search-capability.md).
65
+
66
+ **Supported models:** VECTOR_SEARCH does not directly reference models. Operates on pre-computed ARRAY\<FLOAT64\> embeddings or STRING columns with autonomous embedding generation. Embeddings can come from any source (AI.EMBED, AI.GENERATE_EMBEDDING, external).
67
+
68
+ **Best practices:** Use a vector index for large base tables. Use brute force for exact results. Use single search syntax for single queries (optimized performance).
69
+
70
+ **Limitations:** Row-level and column-level security policies apply. Project running the query must match the project containing the base table. Subqueries in base_table_query might interfere with index usage. Logical views cannot be used. Hybrid search requires the single search syntax and therefore cannot be combined with batch search.
71
+
72
+ **Locations:** Not specified specifically -- operates wherever BigQuery tables exist.
73
+
74
+ **Provisioned throughput:** Not specified. When used with autonomous embedding generation on STRING columns, generative AI function limits apply.
75
+
76
+ **BigFrames API:** `bigframes.bigquery.vector_search(base_table, column_to_search, query)` — Takes base table as string, query as DataFrame/Series. Supports `distance_type`, `top_k`, `fraction_lists_to_search`, `use_brute_force`. Also `bigframes.bigquery.create_vector_index()` for creating vector indexes.
77
+
78
+ ---
@@ -0,0 +1,27 @@
1
+ # What the five have in common
2
+
3
+ > **Source:** [`bigquery-ai/reference/cloud-ai-service-models.md#what-the-five-have-in-common`](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ai/reference/cloud-ai-service-models.md#what-the-five-have-in-common)
4
+
5
+ **A model object that is a handle, not a model.** Every member needs `CREATE MODEL … REMOTE WITH CONNECTION … OPTIONS(REMOTE_SERVICE_TYPE = …)` first. Nothing trains and no data is read:
6
+
7
+ ```sql
8
+ CREATE OR REPLACE MODEL `PROJECT_ID.DATASET.MODEL_NAME`
9
+ REMOTE WITH CONNECTION `PROJECT_ID.REGION.CONNECTION_ID`
10
+ OPTIONS (REMOTE_SERVICE_TYPE = 'CLOUD_AI_VISION_V1');
11
+ ```
12
+
13
+ The model's own metadata says as much: `model_type` is unspecified, the single training run carries an empty `trainingOptions` and an empty `evaluationMetrics`, and the only substance in the record is `remoteModelInfo`. Each notebook prints it in its last SQL example.
14
+
15
+ **`ML.EVALUATE` is rejected.** Asking for it returns *"ML.EVALUATE is not supported for remote models on Cloud AI APIs."* There is nothing to evaluate — the service is the model, and its quality is Google's version number, not your training run.
16
+
17
+ **Models are not in `INFORMATION_SCHEMA`.** `INFORMATION_SCHEMA.TABLES` lists object tables but no models, and this project has no `INFORMATION_SCHEMA.MODELS` view. Read model metadata through the client library (`client.get_model(...).to_api_repr()`) or `bq show --model`.
18
+
19
+ **Three output columns, named after the function.** Each returns the input columns plus `<function>_result` (`JSON`) and `<function>_status` (`STRING`, empty on success). `ML.TRANSCRIBE` adds a fourth, `transcripts` (`STRING`) — the only member that hands back a finished answer without a JSON accessor.
20
+
21
+ **Failures are per row.** A row that the service rejects fills `<function>_status` and leaves the result empty **while the job succeeds**. A pipeline that does not select the status column records the failure as a result. See [Per-row failures](per-row-failures-and-the-retry-pattern.md).
22
+
23
+ **They run on on-demand pricing.** Measured for `ML.TRANSCRIBE` in `INFORMATION_SCHEMA.JOBS_BY_PROJECT`: every call reports no `reservation_id` and an `edition` of `none` — on-demand. No BigQuery Editions reservation is required — unlike the [image preprocessing functions](https://github.com/statmike/bigquery-data-science/blob/main/bigquery-ml/reference/model-free-functions.md#image-preprocessing-functions-mldecode_image-mlresize_image-mlconvert_image_type-mlconvert_color_space) in the sibling `bigquery-ml` project, which fail outright without one. The BigQuery bill is bytes scanned; the service bill is separate and is priced by the service's own unit — characters for Translation and Natural Language, images (and features per image) for Vision, **seconds of audio** for Speech-to-Text, pages for Document AI.
24
+
25
+ **They are the stable option.** Nothing about their output moves when a Gemini default changes. That is the reason to choose them over an `AI.*` function with a prompt, and it is not the same as being deterministic — `ML.TRANSCRIBE` disagrees with itself across identical calls, while `ML.TRANSLATE` and `ML.UNDERSTAND_TEXT` do not. Each notebook measures this directly with the query cache off.
26
+
27
+ ---
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: bigquery-data-science
3
+ description: Use FIRST when someone wants to predict, classify, forecast, embed, search, extract, or explain data in BigQuery and needs to choose between a trained model (bigquery-ml: CREATE MODEL + ML.*), a zero-training generative or foundation model function (bigquery-ai: AI.* + TimesFM + TabFM), or a pre-trained Google Cloud AI service model (ML.PROCESS_DOCUMENT, ML.TRANSLATE, ML.UNDERSTAND_TEXT, ML.ANNOTATE_IMAGE, ML.TRANSCRIBE).
4
+ metadata:
5
+ version: "0.7.0"
6
+ ---
7
+
8
+ # BigQuery Data Science — Umbrella Router & Triage (`bigquery-data-science`)
9
+
10
+ BigQuery provides three distinct, composable surfaces for machine learning and AI in SQL and Python (`bigframes`):
11
+
12
+ 1. **Trained Models & Feature Engineering ([`bigquery-ml`](../bigquery-ml/SKILL.md))** — `CREATE MODEL` + `ML.*` across 23 model types, 49 model-free/lifecycle functions (including `ML.ENTITY_FEATURES_AT_TIME` and `ML.DECODE_IMAGE`), 18 end-to-end workflows (including `AI.CAUSAL_EFFECT` and econometric causal inference), and 8 production orchestration pipelines.
13
+ 2. **Foundation Models & Generative SQL ([`bigquery-ai`](../bigquery-ai/SKILL.md))** — zero-training per-row and table-valued foundation model functions (`AI.GENERATE*`, `AI.IF`, `AI.SCORE`, `AI.CLASSIFY`, `AI.AGG`, `AI.EMBED`, `AI.SEARCH`, `VECTOR_SEARCH`, `AI.FORECAST` on TimesFM, `AI.DETECT_ANOMALIES`, `AI.KEY_DRIVERS`, `AI.PREDICT` + `AI.EVALUATE` on TabFM).
14
+ 3. **Pre-Trained Cloud AI Service Models ([`bigquery-ai`](../bigquery-ai/SKILL.md))** — `CREATE MODEL ... OPTIONS(REMOTE_SERVICE_TYPE = '...')` consumed via `ML.PROCESS_DOCUMENT`, `ML.TRANSLATE`, `ML.UNDERSTAND_TEXT`, `ML.ANNOTATE_IMAGE`, and `ML.TRANSCRIBE`.
15
+
16
+ Before writing SQL or Python, check the [Namespace & Prerequisite Matrix (`reference/namespace-matrix.md`)](reference/namespace-matrix.md) to verify whether a symbol requires a Cloud Resource Connection, IAM role, or BigQuery Enterprise Edition reservation.
17
+
18
+ ## 5 Canonical Skill Patterns
19
+
20
+ 1. **Router Pattern (Triage First)** — Run through the 9 diagnostic questions below to route the task to [`bigquery-ml`](../bigquery-ml/SKILL.md), [`bigquery-ai`](../bigquery-ai/SKILL.md), or a composed pipeline of both.
21
+ 2. **Inversion Pattern (Ask Before Guessing)** — When a user's request is underspecified (e.g., "forecast sales" without specifying horizon, covariates, holiday calendars, or reproducibility requirements), present 2–3 concrete options with their measured tradeoffs rather than silently picking one.
22
+ 3. **Tool Wrapper Pattern (Dual SQL & `bigframes`)** — Pair BigQuery SQL with the matching `bigframes.ml` / `bigframes.bigquery.ai` Python wrapper when a notebook or DataFrame workflow is requested, and use `bigquery-data-science lookup <SYMBOL>` or MCP `lookup_bigquery_syntax` to fetch exact option signatures.
23
+ 4. **Generator Pattern (Idempotent Templates)** — Emit self-contained SQL/Python templates with explicit model/endpoint pins (checked against `skills/pinned-models.json`), deterministic splits (`FARM_FINGERPRINT`), and point-in-time feature joins (`ML.ENTITY_FEATURES_AT_TIME`).
24
+ 5. **Reviewer Pattern (Verification Rubric)** — Audit generated queries against the cross-domain gotchas below (no retired `AI.PARSE_DOCUMENT`, no unpinned `endpoint`, no leaky `GROUP BY` feature joins, no missing reservation warnings for `MATRIX_FACTORIZATION` or `ML.DECODE_IMAGE`).
25
+
26
+ ## 9 Triage Questions — Ask Yourself (or the User) First
27
+
28
+ 1. **Do you have labeled historical data, and do you want a model that improves as data grows and retrains on a schedule?**
29
+ - Yes → [`bigquery-ml`](../bigquery-ml/SKILL.md).
30
+ - No / zero-setup baseline → [`bigquery-ai`](../bigquery-ai/SKILL.md).
31
+ 2. **Do you need coefficient-level interpretability, p-values, feature attribution, or a deterministic audit trail?**
32
+ - Yes → [`bigquery-ml`](../bigquery-ml/SKILL.md) (`ML.WEIGHTS`, `ML.ADVANCED_WEIGHTS`, `ML.GLOBAL_EXPLAIN`, `ML.FEATURE_IMPORTANCE`, `ML.EXPLAIN_PREDICT`).
33
+ 3. **Is the task naturally expressed as a natural-language instruction or schema extraction** ("is this compliant?", "extract line items", "score 1–10", "summarize per category")?
34
+ - Yes → [`bigquery-ai`](../bigquery-ai/SKILL.md) (`AI.IF`, `AI.SCORE`, `AI.CLASSIFY`, `AI.AGG`, `AI.GENERATE`, `AI.GENERATE_TABLE`).
35
+ 4. **For tabular regression or classification, do you need reproducible predictions, > 50 feature columns, or > 10 classes?**
36
+ - Yes → [`bigquery-ml`](../bigquery-ml/SKILL.md) (`LINEAR_REG`, `LOGISTIC_REG`, `BOOSTED_TREE_CLASSIFIER`, `BOOSTED_TREE_REGRESSOR`).
37
+ - No, and you want a zero-training baseline on a small table (<= 50 features, <= 10 classes) → `AI.PREDICT` + `AI.EVALUATE` (TabFM in [`bigquery-ai`](../bigquery-ai/SKILL.md)).
38
+ 5. **For time series, are you forecasting the future or decomposing the past?**
39
+ - **Forecasting with custom holidays, hierarchy, `ML.EXPLAIN_FORECAST` decomposition, or horizon > 1,024** → `ARIMA_PLUS` / `ARIMA_PLUS_XREG` ([`bigquery-ml`](../bigquery-ml/SKILL.md)).
40
+ - **Forecasting with zero training (univariate or multivariate/covariates up to 1,024 steps)** → `AI.FORECAST` with `model => 'TimesFM 2.5'` or `'TimesFM 3.0'` ([`bigquery-ai`](../bigquery-ai/SKILL.md)).
41
+ - **Decomposing past trend, seasonality, or structural level shifts with no forecast** → `ML.TREND`, `ML.SEASONALITY`, `ML.DETECT_CHANGE_POINTS` ([`bigquery-ml`](../bigquery-ml/SKILL.md)).
42
+ 6. **For root-cause metric attribution ("why did conversion drop?"), do you have > 12 dimensions or a ratio/category metric?**
43
+ - Yes → `CONTRIBUTION_ANALYSIS` + `ML.GET_INSIGHTS` ([`bigquery-ml`](../bigquery-ml/SKILL.md)).
44
+ - No (<= 12 dimensions, summable metric) → `AI.KEY_DRIVERS` ([`bigquery-ai`](../bigquery-ai/SKILL.md)).
45
+ 7. **Is the input unstructured text, PDFs, images, or audio needing embeddings, semantic/hybrid search, or multimodal generation?**
46
+ - Yes → [`bigquery-ai`](../bigquery-ai/SKILL.md) (`AI.EMBED`, `VECTOR_SEARCH`, `AI.SEARCH`, `AI.GENERATE*` over `ObjectRef`).
47
+ 8. **Is the task solved by a pre-trained Google Cloud AI API where you need a versioned schema and per-row status column?**
48
+ - Yes → Cloud AI service models in [`bigquery-ai`](../bigquery-ai/SKILL.md) (`ML.PROCESS_DOCUMENT`, `ML.TRANSLATE`, `ML.UNDERSTAND_TEXT`, `ML.ANNOTATE_IMAGE`, `ML.TRANSCRIBE`).
49
+ 9. **Do you need causal treatment-effect estimation or production MLOps retraining & drift monitoring?**
50
+ - Yes → [`bigquery-ml`](../bigquery-ml/SKILL.md) (`AI.CAUSAL_EFFECT`, `difference_in_differences`, `synthetic_control`, `propensity_score_matching`, `price_elasticity_dml`, `uplift_cate`, `ML.VALIDATE_DATA_DRIFT`, and 8 orchestration pipelines).
51
+
52
+ ## 10 Empirical Head-to-Head Comparisons
53
+
54
+ 1. **Forecasting (`ARIMA_PLUS` / `ARIMA_PLUS_XREG` vs `AI.FORECAST`)**: `AI.FORECAST` requires no `CREATE MODEL` and with `model => 'TimesFM 3.0'` (Preview) accepts `target_cols`, `past_covariate_cols`, and `future_covariate_cols` (capped at 1,024 horizon steps and 2,048 context points). `ARIMA_PLUS` and `ARIMA_PLUS_XREG` add custom holiday calendars, hierarchical reconciliation, `ML.EXPLAIN_FORECAST` decomposition, and `ML.ARIMA_COEFFICIENTS`.
55
+ 2. **Time-Series Decomposition (`ML.EXPLAIN_FORECAST` vs `ML.TREND` / `ML.SEASONALITY`)**: Tested on the same Citi Bike series, `ML.SEASONALITY` produces weekly and yearly components **bit-identical** to `ARIMA_PLUS`'s `ML.EXPLAIN_FORECAST` (`corr 1.0`, `mean abs diff 0.0`) with zero model training. `ML.TREND` defaults `adjust_step_changes => FALSE` whereas `ARIMA_PLUS` defaults to `TRUE`.
56
+ 3. **Change Points vs Anomalies vs Dataset Drift (`ML.DETECT_CHANGE_POINTS` vs `AI.DETECT_ANOMALIES` / `ML.DETECT_ANOMALIES` vs `ML.VALIDATE_DATA_DRIFT`)**: `ML.DETECT_CHANGE_POINTS` detects persistent level shifts (and gap-fills missing dates first — profile for ingestion outages before trusting change points!); `AI.DETECT_ANOMALIES` and `ML.DETECT_ANOMALIES` flag point spikes; `ML.VALIDATE_DATA_DRIFT` compares feature distributions across two tables.
57
+ 4. **Driver Attribution (`CONTRIBUTION_ANALYSIS` vs `AI.KEY_DRIVERS`)**: `AI.KEY_DRIVERS` (GA) is a single model-free TVF call for summable metrics with `<= 12` dimensions; `CONTRIBUTION_ANALYSIS` handles `> 12` dimensions plus summable-by-ratio and summable-by-category metrics.
58
+ 5. **Causal Counterfactuals (`AI.CAUSAL_EFFECT` vs Econometric Panel Estimators)**: `AI.CAUSAL_EFFECT` (documented in `bigquery-ml`) is a model-free interrupted time-series counterfactual on a single treated series (needs `> 1` year pre-history when annual seasonality is active). When untreated control units exist, prefer `difference_in_differences` or `synthetic_control`.
59
+ 6. **Tabular Prediction (`LINEAR_REG` / `BOOSTED_TREE_*` vs `AI.PREDICT` & `ML.EVALUATE` vs `AI.EVALUATE`)**: `AI.PREDICT` (TabFM) needs zero training but caps at 50 features and 10 classes, and its predictions are **non-deterministic** across identical runs. `AI.EVALUATE` scores its own internal pass rather than materialized `AI.PREDICT` outputs, whereas `ML.EVALUATE` and `ML.METRICS` deterministically score saved predictions.
60
+ 7. **Unstructured Classification (Trained Classifier vs `AI.CLASSIFY`)**: `AI.CLASSIFY` classifies text or `ObjectRef` media into a fixed category list with zero labeled data; `BOOSTED_TREE_CLASSIFIER` or `LOGISTIC_REG` over `AI.EMBED` features (`embeddings_classification`) is cheaper and faster at high row volume once labeled data exists.
61
+ 8. **Embeddings (`PCA` / `AUTOENCODER` / `MATRIX_FACTORIZATION` vs `AI.EMBED` / `AI.GENERATE_EMBEDDING`)**: Use `bigquery-ml` models for structured/tabular entity embeddings; use `AI.EMBED` (`model => 'embeddinggemma-300m'` or `'gemini-embedding-001'`) for text and multimodal embeddings paired with `VECTOR_SEARCH` or `AI.SEARCH`.
62
+ 9. **Document Extraction (`ML.PROCESS_DOCUMENT` vs `AI.GENERATE_TABLE` / `AI.GENERATE`)**: Never use `AI.PARSE_DOCUMENT` (retired 2026-06-01). Use `ML.PROCESS_DOCUMENT` with a Document AI processor when you need a deterministic layout/invoice schema and per-row `ml_process_document_status`; use `AI.GENERATE` with `output_schema` over `ObjectRef` when you need custom ad-hoc field extraction without provisioning a processor.
63
+ 10. **Pre-Trained Cloud AI Services vs Generative Prompts (`ML.TRANSLATE` / `ML.UNDERSTAND_TEXT` / `ML.ANNOTATE_IMAGE` / `ML.TRANSCRIBE` vs `AI.GENERATE`)**: Cloud AI service models provide fixed taxonomies and per-row error reporting (`ML.TRANSCRIBE` is the one non-deterministic member). Combine both by persisting the service output column and running `AI.GENERATE` or `AI.AGG` over it.
64
+
65
+ ## Routing Links
66
+
67
+ - **Prerequisite & Namespace Matrix (Lens 2)**: [`reference/namespace-matrix.md`](reference/namespace-matrix.md)
68
+ - **BigQuery ML Skill (`CREATE MODEL`, `ML.*`, Feature Store, Causal, Pipelines)**: [`../bigquery-ml/SKILL.md`](../bigquery-ml/SKILL.md)
69
+ - **BigQuery AI Skill (`AI.*`, Cloud AI Service Models, Vector/Hybrid Search, RAG)**: [`../bigquery-ai/SKILL.md`](../bigquery-ai/SKILL.md)
@@ -0,0 +1,112 @@
1
+ # BigQuery Data Science Namespace & Prerequisite Matrix
2
+
3
+ Contents:
4
+ - [Why Namespace Prefix != Skill Folder](#why-namespace-prefix--skill-folder)
5
+ - [BigQuery Edition Reservation Requirements](#bigquery-edition-reservation-requirements)
6
+ - [Trained Models (`CREATE MODEL` in `bigquery-ml`)](#trained-models-create-model-in-bigquery-ml)
7
+ - [Model Lifecycle & Model-Free Functions (`ML.*` in `bigquery-ml`)](#model-lifecycle--model-free-functions-ml-in-bigquery-ml)
8
+ - [Generative, Foundation & Managed Functions (`AI.*` & `VECTOR_SEARCH` in `bigquery-ai`)](#generative-foundation--managed-functions-ai--vector_search-in-bigquery-ai)
9
+ - [Pre-Trained Cloud AI Service Models & Object Infrastructure (`bigquery-ai`)](#pre-trained-cloud-ai-service-models--object-infrastructure-bigquery-ai)
10
+
11
+ ## Why Namespace Prefix != Skill Folder
12
+
13
+ BigQuery's SQL prefix (`ML.*` vs `AI.*`) reflects when a feature was introduced and whether a `MODEL` DDL handle exists — **not** whether a model is trained:
14
+
15
+ - **Cross-prefix placement in [`bigquery-ml`](../../bigquery-ml/SKILL.md)**: `AI.CAUSAL_EFFECT` uses the `AI.*` prefix (model-free interrupted time-series counterfactual TVF) but is documented in `bigquery-ml` alongside `ARIMA_PLUS` and the econometric causal inference workflows (`difference_in_differences`, `synthetic_control`, `propensity_score_matching`, `price_elasticity_dml`, `uplift_cate`).
16
+ - **Cross-prefix placement in [`bigquery-ai`](../../bigquery-ai/SKILL.md)**: `ML.PROCESS_DOCUMENT`, `ML.TRANSLATE`, `ML.UNDERSTAND_TEXT`, `ML.ANNOTATE_IMAGE`, and `ML.TRANSCRIBE` use `CREATE MODEL ... OPTIONS(REMOTE_SERVICE_TYPE = '...')` and `ML.*` TVFs, plus legacy `ML.GENERATE_TEXT` and `ML.GENERATE_EMBEDDING`, and are documented in `bigquery-ai`.
17
+
18
+ ## BigQuery Edition Reservation Requirements
19
+
20
+ Most BigQuery ML and BigQuery AI features run on standard on-demand pricing, **except** three surfaces that strictly require a BigQuery **`ENTERPRISE` (or `ENTERPRISE_PLUS`) Edition reservation**:
21
+
22
+ 1. **`MATRIX_FACTORIZATION` (`CREATE MODEL` in `bigquery-ml`)** — requires a `QUERY` assignment on an `ENTERPRISE` reservation.
23
+ 2. **SQL Image Preprocessing (`ML.DECODE_IMAGE`, `ML.RESIZE_IMAGE`, `ML.CONVERT_COLOR_SPACE`, `ML.CONVERT_IMAGE_TYPE` in `bigquery-ml`)** — all four functions fail on on-demand pricing even on inline `FROM_BASE64` bytes; require an `ENTERPRISE` reservation.
24
+ 3. **Vector Index Background Maintenance (`ALTER VECTOR INDEX` in `bigquery-ai`)** — requires a `BACKGROUND` assignment on an `ENTERPRISE` reservation in the dataset's region.
25
+
26
+ ## Trained Models (`CREATE MODEL` in `bigquery-ml`)
27
+
28
+ | Symbol | Skill | Category | Connection Required | Reservation Required | Status | Walkthrough |
29
+ | --- | --- | --- | --- | --- | --- | --- |
30
+ | `LINEAR_REG` | `bigquery-ml` | Regression | None | On-demand OK | GA | `bigquery-ml/narrative/linear_regression.md` |
31
+ | `LOGISTIC_REG` | `bigquery-ml` | Classification | None | On-demand OK | GA | `bigquery-ml/narrative/logistic_regression.md` |
32
+ | `BOOSTED_TREE_CLASSIFIER` | `bigquery-ml` | Classification (XGBoost) | None | On-demand OK | GA | `bigquery-ml/narrative/boosted_tree_classifier.md` |
33
+ | `BOOSTED_TREE_REGRESSOR` | `bigquery-ml` | Regression (XGBoost) | None | On-demand OK | GA | `bigquery-ml/narrative/boosted_tree_regressor.md` |
34
+ | `RANDOM_FOREST_CLASSIFIER` | `bigquery-ml` | Classification | None | On-demand OK | GA | `bigquery-ml/narrative/random_forest_classifier.md` |
35
+ | `RANDOM_FOREST_REGRESSOR` | `bigquery-ml` | Regression | None | On-demand OK | GA | `bigquery-ml/narrative/random_forest_regressor.md` |
36
+ | `DNN_CLASSIFIER` | `bigquery-ml` | Deep Neural Network | None | On-demand OK | GA | `bigquery-ml/narrative/dnn_classifier.md` |
37
+ | `DNN_REGRESSOR` | `bigquery-ml` | Deep Neural Network | None | On-demand OK | GA | `bigquery-ml/narrative/dnn_regressor.md` |
38
+ | `WIDE_AND_DEEP_CLASSIFIER` | `bigquery-ml` | Wide & Deep Network | None | On-demand OK | GA | `bigquery-ml/narrative/wide_and_deep_classifier.md` |
39
+ | `WIDE_AND_DEEP_REGRESSOR` | `bigquery-ml` | Wide & Deep Network | None | On-demand OK | GA | `bigquery-ml/narrative/wide_and_deep_regressor.md` |
40
+ | `AUTOML_CLASSIFIER` | `bigquery-ml` | AutoML Tabular | None | On-demand OK | GA | `bigquery-ml/narrative/automl_classifier.md` |
41
+ | `AUTOML_REGRESSOR` | `bigquery-ml` | AutoML Tabular | None | On-demand OK | GA | `bigquery-ml/narrative/automl_regressor.md` |
42
+ | `ARIMA_PLUS` | `bigquery-ml` | Univariate Forecasting (`TIME_SERIES_TIMESTAMP_COL`, `TIME_SERIES_DATA_COL`) | None | On-demand OK | GA | `bigquery-ml/narrative/arima_plus.md` |
43
+ | `ARIMA_PLUS_XREG` | `bigquery-ml` | Covariate Forecasting (`TIME_SERIES_TIMESTAMP_COL`, `TIME_SERIES_DATA_COL`) | None | On-demand OK | GA | `bigquery-ml/narrative/arima_plus_xreg.md` |
44
+ | `KMEANS` | `bigquery-ml` | Clustering | None | On-demand OK | GA | `bigquery-ml/narrative/kmeans.md` |
45
+ | `PCA` | `bigquery-ml` | Dimensionality Reduction | None | On-demand OK | GA | `bigquery-ml/narrative/pca.md` |
46
+ | `AUTOENCODER` | `bigquery-ml` | Representation / Anomaly | None | On-demand OK | GA | `bigquery-ml/narrative/autoencoder.md` |
47
+ | `MATRIX_FACTORIZATION` | `bigquery-ml` | Collaborative Filtering | None | **Enterprise Reservation (`QUERY`)** | GA | `bigquery-ml/narrative/matrix_factorization.md` |
48
+ | `CONTRIBUTION_ANALYSIS` | `bigquery-ml` | Driver Attribution | None | On-demand OK | GA | `bigquery-ml/narrative/contribution_analysis.md` |
49
+ | `TRANSFORM_ONLY` | `bigquery-ml` | Reusable Feature Pipeline | None | On-demand OK | GA | `bigquery-ml/narrative/transform_only.md` |
50
+ | `TENSORFLOW` / `ONNX` / `XGBOOST` / `TENSORFLOW_LITE` | `bigquery-ml` | Imported GCS Models | Optional (for Object Tables) | On-demand OK | GA | `bigquery-ml/narrative/imported.md` |
51
+ | `REMOTE WITH CONNECTION` (`endpoint`) | `bigquery-ml` | Vertex AI Endpoint | `CLOUD_RESOURCE` (`roles/aiplatform.user`) | On-demand OK | GA | `bigquery-ml/narrative/remote.md` |
52
+
53
+ ## Model Lifecycle & Model-Free Functions (`ML.*` in `bigquery-ml`)
54
+
55
+ | Symbol | Skill | Category | Connection Required | Reservation Required | Status | Walkthrough |
56
+ | --- | --- | --- | --- | --- | --- | --- |
57
+ | `ML.PREDICT` | `bigquery-ml` | Batch Inference | Only for remote models | On-demand OK | GA | `bigquery-ml/narrative/logistic_regression.md` |
58
+ | `ML.EVALUATE` | `bigquery-ml` | Model / Prediction Eval | None | On-demand OK | GA | `bigquery-ml/narrative/evaluation.md` |
59
+ | `ML.METRICS` | `bigquery-ml` | Model-Free Eval | None | On-demand OK | Preview | `bigquery-ml/narrative/evaluation.md` |
60
+ | `ML.ROC_CURVE` / `ML.CONFUSION_MATRIX` | `bigquery-ml` | Classification Eval | None | On-demand OK | GA | `bigquery-ml/narrative/evaluation.md` |
61
+ | `ML.FORECAST` / `ML.EXPLAIN_FORECAST` | `bigquery-ml` | Time-Series Inference | None | On-demand OK | GA | `bigquery-ml/narrative/arima_plus.md` |
62
+ | `ML.ARIMA_EVALUATE` / `ML.ARIMA_COEFFICIENTS` | `bigquery-ml` | Time-Series Diagnostics | None | On-demand OK | GA | `bigquery-ml/narrative/arima_plus.md` |
63
+ | `ML.TREND` / `ML.SEASONALITY` / `ML.DETECT_CHANGE_POINTS` | `bigquery-ml` | Model-Free Time-Series TVFs | None | On-demand OK | Preview | `bigquery-ml/narrative/time_series.md` |
64
+ | `AI.CAUSAL_EFFECT` | `bigquery-ml` | Interrupted Time-Series Causal TVF | None | On-demand OK | Preview | `bigquery-ml/narrative/causal_effect.md` |
65
+ | `ML.DETECT_ANOMALIES` | `bigquery-ml` | Model-Based Anomaly Detection | None | On-demand OK | GA | `bigquery-ml/narrative/anomaly_fraud_detection.md` |
66
+ | `ML.RECOMMEND` | `bigquery-ml` | Collaborative Filtering Eval | None | On-demand OK | GA | `bigquery-ml/narrative/matrix_factorization.md` |
67
+ | `ML.GET_INSIGHTS` | `bigquery-ml` | Contribution Analysis Output | None | On-demand OK | GA | `bigquery-ml/narrative/contribution_analysis.md` |
68
+ | `ML.EXPLAIN_PREDICT` / `ML.GLOBAL_EXPLAIN` / `ML.FEATURE_IMPORTANCE` / `ML.WEIGHTS` / `ML.ADVANCED_WEIGHTS` | `bigquery-ml` | Explainability & Weights | None | On-demand OK | GA | `bigquery-ml/narrative/evaluation.md` |
69
+ | `ML.FEATURES_AT_TIME` / `ML.ENTITY_FEATURES_AT_TIME` | `bigquery-ml` | Point-in-Time Feature Store | None | On-demand OK | GA | `bigquery-ml/narrative/feature_store.md` |
70
+ | `ML.DESCRIBE_DATA` / `ML.CORRELATION` / `ML.TF_IDF` / `ML.NGRAMS` / `ML.BAG_OF_WORDS` | `bigquery-ml` | EDA & Text Features | None | On-demand OK | GA / Preview | `bigquery-ml/narrative/exploration.md` |
71
+ | `ML.STANDARD_SCALER` / `ML.MIN_MAX_SCALER` / `ML.ROBUST_SCALER` / `ML.MAX_ABS_SCALER` / `ML.NORMALIZER` | `bigquery-ml` | Numerical Scaling | None | On-demand OK | GA | `bigquery-ml/narrative/scalers.md` |
72
+ | `ML.ONE_HOT_ENCODER` / `ML.LABEL_ENCODER` / `ML.TARGET_ENCODER` / `ML.FREQUENCY_ENCODER` / `ML.HASH_BUCKETIZE` | `bigquery-ml` | Categorical Encoding | None | On-demand OK | GA / Preview | `bigquery-ml/narrative/encoding.md` |
73
+ | `ML.BUCKETIZE` / `ML.QUANTILE_BUCKETIZE` / `ML.IMPUTER` / `ML.POLYNOMIAL_EXPAND` / `ML.FEATURE_CROSS` | `bigquery-ml` | Bucketizing & Feature Crosses | None | On-demand OK | GA | `bigquery-ml/narrative/bucketizing.md` |
74
+ | `ML.LP_NORM` / `ML.DISTANCE` / `ML.COSINE_DISTANCE` / `ML.EUCLIDEAN_DISTANCE` / `ML.MANHATTAN_DISTANCE` / `ML.EDIT_DISTANCE` | `bigquery-ml` | Vector & String Distances | None | On-demand OK | GA / Preview | `bigquery-ml/narrative/distance.md` |
75
+ | `ML.DECODE_IMAGE` / `ML.RESIZE_IMAGE` / `ML.CONVERT_COLOR_SPACE` / `ML.CONVERT_IMAGE_TYPE` | `bigquery-ml` | SQL Image Preprocessing | Optional (Object Table) | **Enterprise Reservation (`QUERY`)** | Preview | `bigquery-ml/narrative/image.md` |
76
+ | `ML.VALIDATE_DATA_DRIFT` / `ML.VALIDATE_DATA_SKEW` / `ML.TFDV_DESCRIBE` / `ML.TFDV_VALIDATE` | `bigquery-ml` | Data Drift & Skew Monitoring | None | On-demand OK | GA | `bigquery-ml/narrative/model_monitoring.md` |
77
+
78
+ ## Generative, Foundation & Managed Functions (`AI.*` & `VECTOR_SEARCH` in `bigquery-ai`)
79
+
80
+ | Symbol | Skill | Category | Connection Required | Reservation Required | Status | Walkthrough |
81
+ | --- | --- | --- | --- | --- | --- | --- |
82
+ | `AI.GENERATE` | `bigquery-ai` | General-Purpose Scalar Gen / Schema | End-user creds (Connection optional) | On-demand OK | GA | `bigquery-ai/narrative/ai_generate.md` |
83
+ | `AI.GENERATE_BOOL` / `AI.GENERATE_DOUBLE` / `AI.GENERATE_INT` | `bigquery-ai` | Typed Scalar Generation | End-user creds (Connection optional) | On-demand OK | Preview | `bigquery-ai/narrative/ai_generate_bool.md` |
84
+ | `AI.GENERATE_TABLE` | `bigquery-ai` | Structured TVF Generation | `CLOUD_RESOURCE` (`roles/aiplatform.user`) | On-demand OK | GA | `bigquery-ai/narrative/ai_generate_table.md` |
85
+ | `AI.GENERATE_TEXT` / `ML.GENERATE_TEXT` | `bigquery-ai` | Remote Model Text TVF | `CLOUD_RESOURCE` (`roles/aiplatform.user`) | On-demand OK | GA | `bigquery-ai/narrative/ai_generate_text.md` |
86
+ | `AI.COUNT_TOKENS` | `bigquery-ai` | Local Token Estimator | None | On-demand OK | Preview | `bigquery-ai/narrative/ai_count_tokens.md` |
87
+ | `AI.IF` | `bigquery-ai` | Managed Boolean Filter | End-user creds (Connection optional) | On-demand OK | GA | `bigquery-ai/narrative/ai_if.md` |
88
+ | `AI.SCORE` | `bigquery-ai` | Managed Numeric Rubric Scorer | End-user creds (Connection optional) | On-demand OK | GA | `bigquery-ai/narrative/ai_score.md` |
89
+ | `AI.CLASSIFY` | `bigquery-ai` | Managed Category Classifier | End-user creds (Connection optional) | On-demand OK | GA | `bigquery-ai/narrative/ai_classify.md` |
90
+ | `AI.AGG` | `bigquery-ai` | Managed Aggregate Synthesis | End-user creds (Connection optional) | On-demand OK | Preview | `bigquery-ai/narrative/ai_agg.md` |
91
+ | `AI.EMBED` | `bigquery-ai` | Scalar Text / Multimodal Embedding | None for `embeddinggemma-300m`; Connection for multimodal | On-demand OK | GA | `bigquery-ai/narrative/ai_embed.md` |
92
+ | `AI.GENERATE_EMBEDDING` / `ML.GENERATE_EMBEDDING` | `bigquery-ai` | Remote Model Embedding TVF | `CLOUD_RESOURCE` (`roles/aiplatform.user`) | On-demand OK | GA | `bigquery-ai/narrative/ai_generate_embedding.md` |
93
+ | `AI.SIMILARITY` | `bigquery-ai` | Scalar Pairwise Semantic Similarity | None for `embeddinggemma-300m`; Connection for multimodal | On-demand OK | GA | `bigquery-ai/narrative/ai_similarity.md` |
94
+ | `VECTOR_SEARCH` | `bigquery-ai` | Vector & Hybrid RRF Search TVF | Only when query embedding uses remote model | On-demand OK (`ALTER VECTOR INDEX` needs Enterprise `BACKGROUND`) | GA / Preview (hybrid) | `bigquery-ai/narrative/vector_search.md` |
95
+ | `AI.SEARCH` | `bigquery-ai` | Simplified Autonomous Search TVF | None (autonomous embedding column) | On-demand OK | Preview | `bigquery-ai/narrative/ai_search.md` |
96
+ | `AI.FORECAST` | `bigquery-ai` | Zero-Training TimesFM Forecasting | None | On-demand OK | GA (2.5) / Preview (3.0) | `bigquery-ai/narrative/ai_forecast.md` |
97
+ | `AI.DETECT_ANOMALIES` | `bigquery-ai` | Zero-Training TimesFM Anomalies | None | On-demand OK | GA | `bigquery-ai/narrative/ai_detect_anomalies.md` |
98
+ | `AI.EVALUATE` | `bigquery-ai` | Zero-Training TimesFM / TabFM Eval | None | On-demand OK | GA (TS) / Preview (TabFM) | `bigquery-ai/narrative/ai_evaluate.md` |
99
+ | `AI.PREDICT` | `bigquery-ai` | Zero-Training TabFM Prediction | None | On-demand OK | Preview | `bigquery-ai/narrative/ai_predict.md` |
100
+ | `AI.KEY_DRIVERS` | `bigquery-ai` | Model-Free Driver Analysis TVF | None | On-demand OK | GA | `bigquery-ai/narrative/ai_key_drivers.md` |
101
+ | `AI.PARSE_DOCUMENT` | `bigquery-ai` | **RETIRED (Offline 2026-06-01)** | Replaced by `ML.PROCESS_DOCUMENT` | N/A | Retired | `bigquery-ai/narrative/ai_parse_document.md` |
102
+
103
+ ## Pre-Trained Cloud AI Service Models & Object Infrastructure (`bigquery-ai`)
104
+
105
+ | Symbol | Skill | Category | Connection Required | Reservation Required | Status | Walkthrough |
106
+ | --- | --- | --- | --- | --- | --- | --- |
107
+ | `ML.PROCESS_DOCUMENT` | `bigquery-ai` | Document AI (`CLOUD_AI_DOCUMENT_V1`) | `CLOUD_RESOURCE` (`roles/documentai.apiUser` + `serviceUsageConsumer`) | On-demand OK | GA | `bigquery-ai/narrative/ml_process_document.md` |
108
+ | `ML.TRANSLATE` | `bigquery-ai` | Cloud Translation (`CLOUD_AI_TRANSLATE_V3`) | `CLOUD_RESOURCE` (`roles/cloudtranslate.user` + `serviceUsageConsumer`) | On-demand OK | GA | `bigquery-ai/narrative/ml_translate.md` |
109
+ | `ML.UNDERSTAND_TEXT` | `bigquery-ai` | Cloud Natural Language (`CLOUD_AI_NATURAL_LANGUAGE_V1`) | `CLOUD_RESOURCE` (`roles/serviceusage.serviceUsageConsumer`) | On-demand OK | GA | `bigquery-ai/narrative/ml_understand_text.md` |
110
+ | `ML.ANNOTATE_IMAGE` | `bigquery-ai` | Cloud Vision (`CLOUD_AI_VISION_V1`) | `CLOUD_RESOURCE` (`roles/serviceusage.serviceUsageConsumer`) | On-demand OK | GA | `bigquery-ai/narrative/ml_annotate_image.md` |
111
+ | `ML.TRANSCRIBE` | `bigquery-ai` | Cloud Speech-to-Text (`CLOUD_AI_SPEECH_V1`) | `CLOUD_RESOURCE` (`roles/speech.client` + `serviceUsageConsumer` + Recon SA grant) | On-demand OK | GA | `bigquery-ai/narrative/ml_transcribe.md` |
112
+ | `OBJ.MAKE_REF` / `OBJ.FETCH_METADATA` / `OBJ.GET_ACCESS_URL` / `OBJ.LIST` / `OBJ.READ` | `bigquery-ai` | Unstructured `ObjectRef` Functions | `CLOUD_RESOURCE` (`roles/storage.objectViewer`) | On-demand OK (Object Table + remote model joins may require Enterprise) | GA / Preview | `bigquery-ai/narrative/multimodal_analysis.md` |
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "bigquery-data-science",
3
+ "version": "0.7.0",
4
+ "source_project": null,
5
+ "narrative_sources": {},
6
+ "generated_date": "2026-10-19",
7
+ "source_commit": null,
8
+ "reference_files": [
9
+ "namespace-matrix.md"
10
+ ],
11
+ "syntax_files": [],
12
+ "narrative_files": []
13
+ }