This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
dbt Documentation Checker | |
''' | |
import argparse | |
import json | |
import logging | |
import sys | |
import urllib.parse as url_parse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.cloud import bigquery | |
from bqutils.bigquery_description_manager import BigQueryDescriptionManager | |
bq_client = bigquery.Client() | |
description_manager = BigQueryDescriptionManager(bq_client) | |
source_table_id = 'your_project.your_dataset.source_table' | |
target_table_id = 'your_project.other_dataset.target_view' | |
description_manager.copy_field_descriptions(source_table_id, target_table_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.cloud import bigquery | |
from bqutils.bigquery_description_manager import BigQueryDescriptionManager | |
bq_client = bigquery.Client() | |
description_manager = BigQueryDescriptionManager(bq_client) | |
descriptions_csv_path = 'ga_descriptions.csv' | |
target_table_id = 'your_project.your_dataset.target_table' | |
description_manager.upload_field_descriptions(descriptions_csv_path, target_table_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get indeces | |
GET _cat/indices | |
#Create ads index with mappings | |
PUT ads | |
{ | |
"settings": { | |
"index": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0 |